Exploring the mild oddity that Unix pipes are buffered
https://utcc.utoronto.ca/~cks/space/blog/unix/BufferedPipes [utcc.utoronto.ca]
2019-03-08 18:40
How much kernel buffering there is varies from Unix to Unix. 4 KB used to be the traditional size (it was the size on V7, for example, per the V7 pipe(2) manpage), but modern Unixes often have much bigger limits, and if I’m reading it right POSIX only requires a minimum of 512 bytes. But this isn’t just a simple buffer, because the kernel also guarantees that if you write PIPE_BUF bytes or less to a pipe, your write is atomic and will never be interleaved with other writes from other processes.