Skip to content

Commit 6aa8078

Browse files
committed
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
1 parent c88805a commit 6aa8078

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

db/db.cpp

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1055,14 +1055,6 @@ namespace mongo {
10551055

10561056
namespace mongo {
10571057

1058-
void pipeSigHandler( int signal ) {
1059-
#ifdef psignal
1060-
psignal( signal, "Signal Received : ");
1061-
#else
1062-
cout << "got pipe signal:" << signal << endl;
1063-
#endif
1064-
}
1065-
10661058
void abruptQuit(int x) {
10671059
ostringstream ossSig;
10681060
ossSig << "Got signal: " << x << " (" << strsignal( x ) << ")." << endl;
@@ -1134,7 +1126,7 @@ namespace mongo {
11341126

11351127
assert( signal(SIGABRT, abruptQuit) != SIG_ERR );
11361128
assert( signal(SIGQUIT, abruptQuit) != SIG_ERR );
1137-
assert( signal(SIGPIPE, pipeSigHandler) != SIG_ERR );
1129+
assert( signal(SIGPIPE, SIG_IGN) != SIG_ERR );
11381130

11391131
setupSIGTRAPforGDB();
11401132

0 commit comments

Comments
 (0)