Re:Things Unix can do atomically (2010)
by bluetomcat on Tuesday May 31, 2016 @03:31AM
(#11805226)
The PIPE_BUF POSIX requirement is about guaranteeing that when multiple processes write less than PIPE_BUF to the same pipe, the reader will not see its input intermingled from different processes. It is often wrongly interpreted as "a single write() of less than PIPE_BUF will be retrieved via a single read() on the other side".
They won't be split, bit one thing to watch out for is that they can be coalesced.
I read a while back that this PIPE_BUF restriction also applies to multiple writers appending a file.
Re:Things Unix can do atomically (2010)
by adrianratnapala on Tuesday May 31, 2016 @12:44AM
(#11804617)
I think Linux goes out of its ways to make writes <= 512 bytes atomic. Helpful for writing log files. But I don't think this is a true guarantee in any standardised sense.
Anyone know if there's a similar guarantee for files?