From 88e1d56a98d09786704f977e2f943e1bcea851e8 Mon Sep 17 00:00:00 2001 From: o9000 Date: Tue, 5 Jan 2016 01:33:27 +0100 Subject: [PATCH] Reorder some statements --- src/tint.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/tint.c b/src/tint.c index 7160f87..f78fb40 100644 --- a/src/tint.c +++ b/src/tint.c @@ -326,13 +326,16 @@ void init(int argc, char *argv[]) } // Set signal handlers signal_pending = 0; - struct sigaction sa = {.sa_handler = signal_handler}; + struct sigaction sa_chld = {.sa_handler = SIG_DFL, .sa_flags = SA_NOCLDWAIT}; + sigaction(SIGCHLD, &sa_chld, 0); + + struct sigaction sa = {.sa_handler = signal_handler}; sigaction(SIGUSR1, &sa, 0); sigaction(SIGINT, &sa, 0); sigaction(SIGTERM, &sa, 0); sigaction(SIGHUP, &sa, 0); - sigaction(SIGCHLD, &sa_chld, 0); + #ifdef BACKTRACE_ON_SIGNAL struct sigaction sa_crash = {.sa_handler = crash_handler}; sigaction(SIGSEGV, &sa_crash, 0);