ignore SIGPIPE (like SIGCHLD)

sayer/1.4-spce2.6
Stefan Sayer 16 years ago
parent 972bf9e01e
commit f300e8ec18

@ -94,6 +94,7 @@ vector <string> AmConfig::CodecOrder;
Dtmf::InbandDetectorType
AmConfig::DefaultDTMFDetector = Dtmf::SEMSInternal;
bool AmConfig::IgnoreSIGCHLD = true;
bool AmConfig::IgnoreSIGPIPE = true;
int AmConfig::setSIPPort(const string& port)
{

@ -145,6 +145,8 @@ struct AmConfig
static bool IgnoreSIGCHLD;
static bool IgnoreSIGPIPE;
static bool LogSessions;
static bool LogEvents;

@ -207,6 +207,10 @@ static void signal_handler(int sig)
return;
}
if (sig == SIGPIPE && AmConfig::IgnoreSIGPIPE) {
return;
}
if (main_pid == getpid()) {
if(!is_shutting_down.get()) {
is_shutting_down.set(true);

Loading…
Cancel
Save