in reply to How to detect dead socket

What you get when you write to a closed socket is the signal SIGPIPE. Like many signals, the default action for SIGPIPE is to give up and die. If you want your program not to die when it gets SIGPIPE, you can set up a signal handler for it that does something else. This, BTW, is not Perl specific. The same issue arises on a Unix-type OS under any language which doesn't implicitly ignore or automatically deal with signals.


Christopher E. Stith