Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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?


if 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.


The 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?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: