Ticket #22: sigpipe.patch
File sigpipe.patch, 1.3 KB (added by , 16 years ago) |
---|
-
SHERPA/Run/Main.C
28 28 std::set_unexpected(ATOOLS::Terminate); 29 29 signal(SIGSEGV,ATOOLS::SignalHandler); 30 30 signal(SIGINT,ATOOLS::SignalHandler); 31 signal(SIGPIPE,ATOOLS::SignalHandler); 31 32 signal(SIGBUS,ATOOLS::SignalHandler); 32 33 signal(SIGFPE,ATOOLS::SignalHandler); 33 34 signal(SIGABRT,ATOOLS::SignalHandler); -
ATOOLS/Org/Exception_Handler.C
134 134 bool modifiable=msg->Modifiable(); 135 135 SetExitCode(); 136 136 if ((m_signal!=SIGTERM && m_signal!=SIGINT && 137 m_signal!=SIGXCPU ) &&137 m_signal!=SIGXCPU && m_signal!=SIGPIPE) && 138 138 (m_exception==NULL || 139 139 (m_exception->Type()!=ex::normal_exit && 140 140 m_exception->Type()!=ex::missing_input))) { … … 289 289 m_exitcode=1; 290 290 Terminate(); 291 291 break; 292 case SIGPIPE: 293 msg_Error()<<" Pipe closed. Will stop writing."<<om::reset<<std::endl; 294 m_exitcode=0; 295 Terminate(); 296 break; 292 297 default: 293 298 msg_Error()<<" Cannot handle signal."<<om::reset<<std::endl; 294 299 m_exitcode=1;