Important Update:

- Ingore SIGPIPE event, ie. writing to socket after it closed
This commit is contained in:
Charl Wentzel
2016-06-01 06:58:48 +02:00
parent 1aa0d98b35
commit 59facdf1bd

View File

@@ -37,6 +37,7 @@ void ConfigureSignalHandlers()
// Signals to be ignored // Signals to be ignored
signal( SIGCHLD, SIG_IGN ); signal( SIGCHLD, SIG_IGN );
signal( SIGPIPE, SIG_IGN );
// Signals for normal termination // Signals for normal termination
TermAct.sa_handler = SignalTerminate; TermAct.sa_handler = SignalTerminate;
@@ -57,7 +58,6 @@ void ConfigureSignalHandlers()
sigaction( SIGABRT, &AbortAct, 0 ); sigaction( SIGABRT, &AbortAct, 0 );
sigaction( SIGFPE, &AbortAct, 0 ); sigaction( SIGFPE, &AbortAct, 0 );
sigaction( SIGILL, &AbortAct, 0 ); sigaction( SIGILL, &AbortAct, 0 );
sigaction( SIGPIPE, &AbortAct, 0 );
sigaction( SIGSEGV, &AbortAct, 0 ); sigaction( SIGSEGV, &AbortAct, 0 );
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------