From b34255b758cdde06b88ba619e6502d6ce6bc3ebb Mon Sep 17 00:00:00 2001 From: fcicq Date: Sun, 5 May 2013 13:37:03 +0800 Subject: [PATCH] Ignore SIGPIPE signal on Solaris --- src/init.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/init.cpp b/src/init.cpp index f6b2c91b4..bf312acd1 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -365,6 +365,11 @@ bool AppInit2(boost::thread_group& threadGroup) sigemptyset(&sa_hup.sa_mask); sa_hup.sa_flags = 0; sigaction(SIGHUP, &sa_hup, NULL); + +#if defined (__SVR4) && defined (__sun) + // ignore SIGPIPE on Solaris + signal(SIGPIPE, SIG_IGN); +#endif #endif // ********************************************************* Step 2: parameter interactions