@ElanaPearl Nice writeup and thanks for proposing a fix for older versions of MacOS. (Merging now)
Have you tried to reach out to the community before getting to the bottom of the problem? (You've submitted issue and fix one day apart, haven't you?)
Also why MacOS-14 in 2025?
@ezyang It’s not guaranteed. Also what language/os are you talking about? Linux write syscall is atomic, but it can write less bytes then requested (indicated by return code) writes to pipe are sliced if there are no space in the buffer (i.e. reader is slower than writers)