From d034248de09e23adad43c92aefb4fe2c9d4e9eac Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Sat, 10 Dec 2011 11:05:37 +0000 Subject: [PATCH] sighandler: handle all "Core" signals --- src/sighandler.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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"); } -- 2.39.5