Working with Process Pipe and Its 64KiB Limit

Helge Heß pointed out that naive usage of Pipe in child Processes can break your program if you pipe too much data. I wasn’t aware of this, followed his references, and here are my findings. Older Mac OS X versions had a pipe buffer size of 16KiB by default, offering 64KiB on demand; in my N=1 test on an M1 with macOS 14, I always get 64KiB buffers, even if I only send 1 Byte. Run pipe buffer size discovery tests yourself to check.

Continue reading …