diff options
Diffstat (limited to 'lib/portability.c')
-rw-r--r-- | lib/portability.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/portability.c b/lib/portability.c index 26b854d6..8b8f0f3b 100644 --- a/lib/portability.c +++ b/lib/portability.c @@ -452,9 +452,9 @@ void xsignal_all_killers(void *handler) { int i; - for (i=0; signames[i].num != SIGCHLD; i++) - if (signames[i].num != SIGKILL) - xsignal(signames[i].num, handler ? exit_signal : SIG_DFL); + if (!handler) handler = SIG_DFL; + for (i = 0; signames[i].num != SIGCHLD; i++) + if (signames[i].num != SIGKILL) xsignal(signames[i].num, handler); } // Convert a string like "9", "KILL", "SIGHUP", or "SIGRTMIN+2" to a number. |