bug-coreutils
[Top][All Lists]
Advanced

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

bug#11100: Racy code in copy.c


From: Paul Eggert
Subject: bug#11100: Racy code in copy.c
Date: Tue, 27 Mar 2012 09:03:30 -0700
User-agent: Mozilla/5.0 (X11; Linux i686; rv:11.0) Gecko/20120310 Thunderbird/11.0

On 03/27/2012 05:58 AM, Philipp Thomas wrote:
> The above mentioned code assumes that the file still
> exists.  This is racy - particularly for NFS where deletions from other
> clients can take a while to appear.

*NEW_DST is a bit more complicated than that.  At least for part
of the code it means the file was known not to exist, which is not
the same thing as being true if the file does not exist and false
otherwise.  (Sometimes I think I need to take a course on epistemology
to understand this code, which is not a good sign....)

In general 'cp' is not and cannot be free from races due to other
active processes.  A fix could well be needed here, to work around NFS
bugs, but it'd need to be thought through in the light of other
use cases.





reply via email to

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