Add clarifying comment for SIGPIPE

This commit is contained in:
Nick Krichevsky 2018-09-10 00:28:30 -04:00
parent 5c693677e6
commit b2968b10e8

View file

@ -14,6 +14,7 @@ bool running = true;
void handle_signal(int signal) { void handle_signal(int signal) {
if (signal == SIGPIPE) { if (signal == SIGPIPE) {
// We must ignore SIGPIPEs such that EPIPEs can be returned from socket read/write functions.
return; return;
} }
if (signal == SIGINT || signal == SIGTERM) { if (signal == SIGINT || signal == SIGTERM) {