GNU bug report logs - #12366
[gnu-prog-discuss] Writing unwritable files

Previous Next

Package: coreutils;

Reported by: Paolo Bonzini <bonzini <at> gnu.org>

Date: Thu, 6 Sep 2012 12:14:01 UTC

Severity: normal

Done: Jim Meyering <meyering <at> hx.meyering.net>

Bug is archived. No further changes may be made.

Full log


Message #26 received at 12366 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Paolo Bonzini <bonzini <at> gnu.org>
Cc: 12366 <at> debbugs.gnu.org, gnu-prog-discuss <at> gnu.org,
	John Darrington <john <at> darrington.wattle.id.au>
Subject: Re: bug#12366: [gnu-prog-discuss] Writing unwritable files
Date: Thu, 06 Sep 2012 09:35:54 -0700
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.




This bug report was last modified 12 years and 232 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.