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