From 6aa80782bc30162efb8f736863ed4b6bf2e94244 Mon Sep 17 00:00:00 2001 From: Eric Milkie Date: Mon, 23 Jul 2012 10:48:08 -0400 Subject: SERVER-6509 ignore SIGPIPE rather than printing a message Solaris was crashing because we were using signal() instead of sigaction() to install the dummy signal handler for SIGPIPE. SIGPIPE is supressed via the socket library on other operating systems but this is not an option on Solaris. Conflicts: db/db.cpp --- db/db.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/db/db.cpp b/db/db.cpp index 2a08ff3db3e..e250745583a 100644 --- a/db/db.cpp +++ b/db/db.cpp @@ -1055,14 +1055,6 @@ namespace mongo { namespace mongo { - void pipeSigHandler( int signal ) { -#ifdef psignal - psignal( signal, "Signal Received : "); -#else - cout << "got pipe signal:" << signal << endl; -#endif - } - void abruptQuit(int x) { ostringstream ossSig; ossSig << "Got signal: " << x << " (" << strsignal( x ) << ")." << endl; @@ -1134,7 +1126,7 @@ namespace mongo { assert( signal(SIGABRT, abruptQuit) != SIG_ERR ); assert( signal(SIGQUIT, abruptQuit) != SIG_ERR ); - assert( signal(SIGPIPE, pipeSigHandler) != SIG_ERR ); + assert( signal(SIGPIPE, SIG_IGN) != SIG_ERR ); setupSIGTRAPforGDB(); -- cgit v1.2.1