Subject: bug#12366: [gnu-prog-discuss] Writing unwritable files

From: Paul Eggert <[email-masked]>
Date: Thu, 06 Sep 2012 10:23:32 -0700

On 09/06/2012 10:12 AM, Bob Proulx wrote:
> The file replacement is atomic.  The reading of the file is not.

Sure, but the point is that from the end user's
point of view, 'sed -i' is not atomic, and can't
be expected to be atomic.

'sed -i' and 'sort -o' both use some atomic operations
internally, but neither is atomic overall.  Users who
want atomicity must look elsewhere, or implement it
themselves.