Hacker News new | past | comments | ask | show | jobs | submit login

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?




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: