[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#12366: [gnu-prog-discuss] Writing unwritable files
From: |
Bob Proulx |
Subject: |
bug#12366: [gnu-prog-discuss] Writing unwritable files |
Date: |
Thu, 6 Sep 2012 11:12:25 -0600 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Paul Eggert wrote:
> >> If some other process is writing F
> >> while I run 'sed -i F', F is not replaced atomically.
>
> > How not so?
>
> For example:
>
> echo ac >f
> sed -i 's/a/b/' f &
> sed -i 's/c/d/' f
> wait
> cat f
>
> If 'sed' were truly atomic, then the output of this would
> always be 'bd'. But it's not.
The file replacement is atomic. The reading of the file is not.
Bob
- bug#12366: [gnu-prog-discuss] Writing unwritable files, Paolo Bonzini, 2012/09/06
- bug#12366: [gnu-prog-discuss] Writing unwritable files, Pádraig Brady, 2012/09/06
- bug#12366: [gnu-prog-discuss] Writing unwritable files, Bernhard Voelker, 2012/09/06
- bug#12366: [gnu-prog-discuss] Writing unwritable files, Jim Meyering, 2012/09/06
- bug#12366: [gnu-prog-discuss] Writing unwritable files, Paul Eggert, 2012/09/06
- bug#12366: [gnu-prog-discuss] Writing unwritable files, Paolo Bonzini, 2012/09/06
- bug#12366: [gnu-prog-discuss] Writing unwritable files, Paul Eggert, 2012/09/06
- bug#12366: [gnu-prog-discuss] Writing unwritable files, Paolo Bonzini, 2012/09/06
- bug#12366: [gnu-prog-discuss] Writing unwritable files, Paul Eggert, 2012/09/06
- bug#12366: [gnu-prog-discuss] Writing unwritable files,
Bob Proulx <=
- bug#12366: [gnu-prog-discuss] Writing unwritable files, Paul Eggert, 2012/09/06
- bug#12366: [gnu-prog-discuss] Writing unwritable files, Bernhard Voelker, 2012/09/06
- bug#12366: [gnu-prog-discuss] Writing unwritable files, Paul Eggert, 2012/09/06
- bug#12366: [gnu-prog-discuss] bug#12366: Writing unwritable files, John Darrington, 2012/09/06
- bug#12366: [gnu-prog-discuss] bug#12366: Writing unwritable files, Paolo Bonzini, 2012/09/07
- bug#12366: [gnu-prog-discuss] bug#12366: Writing unwritable files, Paul Eggert, 2012/09/07
- bug#12366: [gnu-prog-discuss] bug#12366: Writing unwritable files, Bob Proulx, 2012/09/07
- bug#12366: [gnu-prog-discuss] bug#12366: Writing unwritable files, Bob Friesenhahn, 2012/09/06
- bug#12366: [gnu-prog-discuss] bug#12366: Writing unwritable files, Paolo Bonzini, 2012/09/06