3 ms·
I'm surprised that SIGPIPE is not mentioned (and barely present in comments). It's 90% of why I'm scared of signals and every time I write something mixing IO a
by c-cube 3y ago
I'm surprised that SIGPIPE is not mentioned (and barely present in comments). It's 90% of why I'm scared of signals and every time I write something mixing IO and threads it eventually rears its disgusting head. Can someone shine a light on what the heck it's designed to do?
- convolvatron 3y agoif you have a piped series of processes at the command line, and the middle process dies, how does the earlier part of the pipe get cleaned up? more tangentially, the older inetd model of spawning a process per connection used it for cleanup as well.
- c-cube 3y agoThe earlier part tries to write, gets `0` or `-1` with an error, concludes the pipe is closed, and exits? The doc for `write` even specifies the error code `EPIPE` that is set alongside with the `SIGPIPE`. Why the signal, when it's redundant?