Skip to main content

Timeline for How to find out if pipe is broken?

Current License: CC BY-SA 4.0

3 events
when toggle format what by license comment
Feb 25, 2023 at 10:01 comment added ilkkachu @StéphaneChazelas, yeh, the man page I was reading says "If all file descriptors referring to the read end of a pipe have been closed, then a write(2) will cause a SIGPIPE signal to be generated for the calling process." though I'm not surprised a zero-byte write would be different. But as mentioned, it doesn't matter here.
Feb 24, 2023 at 18:35 comment added Stéphane Chazelas POSIX leaves it unspecified what write(1, "", 0) does on a pipe and on Linux, I find it doesn't do anything even on a broken pipe.
Feb 24, 2023 at 18:33 history answered ilkkachu CC BY-SA 4.0