From: hwangcc23 Date: Thu, 31 Aug 2017 14:48:33 +0000 (+0800) Subject: Properly initialize sigaction struct X-Git-Tag: 4.14.1~70 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=09ee12d8e5e1cd219493fde3393dbca10c0cc23f;p=i3%2Fi3 Properly initialize sigaction struct The code in handle_signal() wasn't clearing the struct sigaction before passing it to sigaction(). This meant that we would block a random set of signals while executing the default handler, or jump to the uninitialized __sa_sigaction__ (instead of sa_handler). Initialize properly as we do in setup_signal_handler(). --- diff --git a/src/sighandler.c b/src/sighandler.c index b1e7d166..1a161d2a 100644 --- a/src/sighandler.c +++ b/src/sighandler.c @@ -305,6 +305,8 @@ void handle_signal(int sig, siginfo_t *info, void *data) { struct sigaction action; action.sa_handler = SIG_DFL; + action.sa_flags = 0; + sigemptyset(&action.sa_mask); sigaction(sig, &action, NULL); raised_signal = sig;