BUG/MINOR: don't ignore SIG{BUS,FPE,ILL,SEGV} during signal processing

We don't have any reason of blocking those signals.

If SIGBUS, SIGFPE, SIGILL, or SIGSEGV are generated while they are blocked, the
result is undefined, unless the signal was generated by kill(2), sigqueue(3), or
raise(3).

This should be backported to 1.8.
This commit is contained in:
William Lallemand 2018-06-07 09:49:04 +02:00 committed by Willy Tarreau
parent 1aab50bb4a
commit 933642c6ef

View File

@ -120,6 +120,14 @@ int signal_init()
sigfillset(&blocked_sig);
sigdelset(&blocked_sig, SIGPROF);
/* man sigprocmask: If SIGBUS, SIGFPE, SIGILL, or SIGSEGV are
generated while they are blocked, the result is undefined, unless
the signal was generated by kill(2),
sigqueue(3), or raise(3) */
sigdelset(&blocked_sig, SIGBUS);
sigdelset(&blocked_sig, SIGFPE);
sigdelset(&blocked_sig, SIGILL);
sigdelset(&blocked_sig, SIGSEGV);
for (sig = 0; sig < MAX_SIGNAL; sig++)
LIST_INIT(&signal_state[sig].handlers);