Commit 2c8affbb authored by jselbie's avatar jselbie

sigpipe fix (for tcp mode)

parent 7aa71a19
......@@ -15,5 +15,7 @@ Version 1.2.1 - Fixed various compile and test issues, including the sync_add_fe
Version 1.2.2 - Fixed regression with regards to compiling with 32-bit clang++
Version 1.2.3 - Globally disable SIGPIPE
......@@ -672,6 +672,12 @@ int main(int argc, char** argv)
DumpConfig(config);
// For now, just swallow sigpipe events globally so TCP server won't blow up
// on a send() call to a disconnected client
// There's other ways to do this (sigaction on each thread, MSG_NOSIGNAL, SO_NOSIGPIPE, etc...)
// This seems just as good, and is the most portable
signal(SIGPIPE, SIG_IGN);
InitAppExitListener();
if (config.fTCP == false)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment