From: Joshua Swanson on
So, I've got my server up and running nicely, but when the clients computer
crashes without finishing the connection, leaving me with a broken pipe, it
shuts down my server.
What's the best way to handle this? I'm tempted just to throw in an ignore
signal handle (signal(SIGPIPE, SIG_IGN) of the top of my head) and pay no
attention to broken pipes, but I don't know enough to be sure this is always
correct. For instance, I don't get why the signal is fatal by default, as it
seems relatively minor.