remove-source-files checking for open files?

Roy Sigurd Karlsbakk roy at karlsbakk.net
Wed Jun 3 17:26:42 GMT 2009


On 3. juni. 2009, at 18.16, Paul Slootman wrote:

> On Wed 03 Jun 2009, Roy Sigurd Karlsbakk wrote:
>
>>> I would solve this not using rsync, but by writing the active file  
>>> in a
>>> separate directory, or by first writing to a special filename and
>>> renaming when done (like firefox adds .part to the filename while it
>>> is
>>> still downloading it).
>>
>> Why not just something like --ignore-open-files?
>
> Because checking whether a process has a file open can be very  
> costly in
> system resources.


Not really. I'm writing some code doing this now. It will be Linux  
specific, but it will be fairly quick. Traversing /proc/pid/fd in  
search for symlinks to your file isn't really that bad. I'll post the  
code when I'm done with it.

roy
--
Roy Sigurd Karlsbakk
(+47) 97542685 / 98013356
roy at karlsbakk.net
http://blogg.karlsbakk.net/
--
I all pedagogikk er det essensielt at pensum presenteres  
intelligibelt. Det er et elementært imperativ for alle pedagoger å  
unngå eksessiv anvendelse av idiomer med fremmed opprinnelse. I de  
fleste tilfeller eksisterer adekvate og relevante synonymer på norsk.



More information about the rsync mailing list