Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120828 Thunderbird/15.0
On 09/06/2012 09:24 AM, Paolo Bonzini wrote:
> A program that reads the target file will never
> be able to observe an intermediate result.
Sure, but that doesn't fix the race condition I
mentioned. If some other process is writing F
while I run 'sed -i F', F is not replaced atomically.
That's true even if the other process is another
instance of 'sed'.
While 'sed -i' solves some race conditions,
it doesn't even come close to solving them all.
Fixing this problem in general is above
sed's pay grade, just as it's above shuf's.