summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-04-13 02:00:30 +0200
committerLennart Poettering <lennart@poettering.net>2010-04-13 02:00:30 +0200
commit5373d6020426671680704d2f573f82c1659852da (patch)
treeeda30f98febea0e7c1753194805bbf4e6e97a093
parent28247076541bb1d1c0b09c8e10f4dcb421e20188 (diff)
main: install crash handler in all signals that usually dump core
-rw-r--r--main.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/main.c b/main.c
index 68a9021083..9323d45f73 100644
--- a/main.c
+++ b/main.c
@@ -127,6 +127,10 @@ static void install_crash_handler(void) {
sa.sa_flags = SA_NODEFER;
assert_se(sigaction(SIGSEGV, &sa, NULL) == 0);
+ assert_se(sigaction(SIGILL, &sa, NULL) == 0);
+ assert_se(sigaction(SIGFPE, &sa, NULL) == 0);
+ assert_se(sigaction(SIGBUS, &sa, NULL) == 0);
+ assert_se(sigaction(SIGQUIT, &sa, NULL) == 0);
assert_se(sigaction(SIGABRT, &sa, NULL) == 0);
}
@@ -427,7 +431,8 @@ int main(int argc, char *argv[]) {
log_open_syslog();
log_open_kmsg();
- /* Make sure we leave a core dump */
+ /* Make sure we leave a core dump without panicing the
+ * kernel. */
if (getpid() == 1)
install_crash_handler();