remove-source-files checking for open files?

Paul Slootman paul+rsync at wurtel.net
Wed Jun 3 17:31:34 GMT 2009


On Wed 03 Jun 2009, Roy Sigurd Karlsbakk wrote:
> On 3. juni. 2009, at 18.16, Paul Slootman wrote:
>>
>> 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  

Well, it's not something to do lightly...

> 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 

This also only works if you own the process keeping the file open, or if
you're the superuser.

> I'm done with it.

The linux-specific thing is also a reason why I suspect it won't become
part of rsync.


Paul


More information about the rsync mailing list