remove-source-files checking for open files?

Roy Sigurd Karlsbakk roy at
Wed Jun 3 19:23:48 GMT 2009

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

> 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.

The code I'm writing only checks for its own UID unless UID == 0

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

I guess others will be able to port the code to other platforms if it  
seems to work. Having more features for one OS and "pending" for  
others won't really hurt the project

Roy Sigurd Karlsbakk
(+47) 97542685 / 98013356
roy at
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