I'm reading about pipe(7)s in Linux and came across the following thing:
POSIX.1 says that
write(2)s of less thanPIPE_BUFbytes must be atomic: the output data is written to the pipe as a contiguous sequence. Writes of more thanPIPE_BUFbytes may be nonatomic: the kernel may interleave the data with data written by other processes. POSIX.1 requiresPIPE_BUFto be at least 512 bytes. (On Linux,PIPE_BUFis 4096 bytes.)
This is not quite clear. Does POSIX require that all writes less then PIPE_BUF are atomic? Or this is true to pipes created with pipe(int[2], int) only?