coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [coreutils] [PATCH] sort: fix some --compress reaper bugs


From: Pádraig Brady
Subject: Re: [coreutils] [PATCH] sort: fix some --compress reaper bugs
Date: Tue, 14 Dec 2010 10:07:49 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3

On 14/12/10 09:55, Jim Meyering wrote:
> Paul Eggert wrote:

>> +# Give compression subprocesses time to react when 'sort' exits.
>> +# Otherwise, under NFS, when 'sort' unlinks the temp files and they
>> +# are renamed to .nfsXXXX instead of being removed, the parent cleanup
>> +# of this directory will fail because the files are still open.
>> +sleep 1
> 
> It'd be a shame to make everyone sleep even one second for NFS.
> And on a heavily loaded system, 1 second might not be enough.
> Can you formulate that as a loop that sleeps say 0.1 seconds
> at a time for up to 5 seconds and that checks whether it's
> safe to exit?

is_local_dir_ is available.

The more general sleep loop could be implemented
with retry_delay_ I think?

If the subprocesses were reparented to the shell,
then one could just `wait`.

cheers,
Pádraig.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]