sighandler: handle all "Core" signals

next
Michael Stapelberg 2011-12-10 11:05:37 +00:00
parent aa82adb5c0
commit d034248de0
1 changed files with 5 additions and 2 deletions

View File

@ -199,8 +199,11 @@ void setup_signal_handler() {
action.sa_flags = SA_NODEFER | SA_RESETHAND | SA_SIGINFO;
sigemptyset(&action.sa_mask);
if (sigaction(SIGSEGV, &action, NULL) == -1 ||
/* Catch all signals with default action "Core", see signal(7) */
if (sigaction(SIGQUIT, &action, NULL) == -1 ||
sigaction(SIGILL, &action, NULL) == -1 ||
sigaction(SIGABRT, &action, NULL) == -1 ||
sigaction(SIGFPE, &action, NULL) == -1)
sigaction(SIGFPE, &action, NULL) == -1 ||
sigaction(SIGSEGV, &action, NULL) == -1)
ELOG("Could not setup signal handler");
}