]> git.sur5r.net Git - i3/i3/blobdiff - src/sighandler.c
Merge branch 'master' into next
[i3/i3] / src / sighandler.c
index ca74813d36e2e0f215a4969e3740724368faf6ab..4a0c13b5aa1a396f40fa5f29af9c7ff820652aa8 100644 (file)
@@ -51,7 +51,7 @@ static int sig_draw_window(xcb_window_t win, int width, int height, int font_hei
 
     for (int i = 0; i < sizeof(crash_text) / sizeof(char*); i++) {
         draw_text(crash_text[i], strlen(crash_text[i]), false, pixmap, pixmap_gc,
-                8, 3 + (i - 1) * font_height, width - 16);
+                8, 5 + i * font_height, width - 16);
     }
 
     /* Copy the contents of the pixmap to the real window */
@@ -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");
 }