The GNU C library manual briefly mentioned that both reads and writes for a pipe are atomic
Reading or writing pipe data is atomic if the size of data written is not greater than PIPE_BUF.
However, the manual pages on Linux, like man 7 pipe, do not mentioned that reads are atomic and man 2 read explicitly states that read may return less than the requested amount if read was interrupted by a signal.
So are the read calls for a pipe with the read length under
PIPE_BUF are truly atomic on Linux?
In particular, if a single writer to the pipe always write, for example, 12 byte chunk and there are 2 concurrent readers for the pipe that read the pipe by 12 bytes, do those readers either get exactly 12 byte read or an error like
EAGAIN with no possibility of getting a partial read?
Also, what about the case when the writer writes by 12 byte chunks but concurrent readers try to read up to
PIPE_BUF/12 chunks at once? Does a successful read then always return the exact multiplier of 12 bytes or can it return any number of bytes?