1
0
Fork 0

Added SIGABRT to catchers list

This commit is contained in:
Tiger Wang 2014-01-26 16:15:05 +00:00
parent 09ee8a1bb6
commit ea9de4bbb7
1 changed files with 6 additions and 1 deletions

View File

@ -68,9 +68,10 @@ void NonCtrlHandler(int a_Signal)
LOGERROR("Details | SIGABRT: Server self-terminated due to an internal fault");
break;
}
case SIGINT:
case SIGTERM:
{
std::signal(SIGTERM, SIG_IGN); // Server is shutting down, wait for it...
std::signal(a_Signal, SIG_IGN); // Server is shutting down, wait for it...
break;
}
default: break;
@ -224,6 +225,10 @@ int main( int argc, char **argv )
std::signal(SIGSEGV, NonCtrlHandler);
std::signal(SIGTERM, NonCtrlHandler);
std::signal(SIGINT, NonCtrlHandler);
std::signal(SIGABRT, NonCtrlHandler);
#ifdef SIGABRT_COMPAT
std::signal(SIGABRT_COMPAT, NonCtrlHandler);
#endif // SIGABRT_COMPAT
#endif
// DEBUG: test the dumpfile creation: