From: Michael Stapelberg Date: Sat, 10 Dec 2011 11:05:37 +0000 (+0000) Subject: sighandler: handle all "Core" signals X-Git-Tag: 4.2~194^2~5 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d034248de09e23adad43c92aefb4fe2c9d4e9eac;p=i3%2Fi3 sighandler: handle all "Core" signals --- diff --git a/src/sighandler.c b/src/sighandler.c index ca74813d..86366413 100644 --- a/src/sighandler.c +++ b/src/sighandler.c @@ -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"); }