From de0e3fc0fb96df55bbd5b5474433f3ed9a583664 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Mon, 27 Dec 2021 14:08:20 -0600 Subject: [PATCH] Make xsignal_all_killers() slightly less magic. (Use SIG_DFL instead of NULL.) --- lib/portability.c | 1 - toys/pending/init.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/portability.c b/lib/portability.c index cd917bc9..3e5520cc 100644 --- a/lib/portability.c +++ b/lib/portability.c @@ -465,7 +465,6 @@ void xsignal_all_killers(void *handler) { int i; - if (!handler) handler = SIG_DFL; for (i = 1; signames[i].num != SIGCHLD; i++) if (signames[i].num != SIGKILL) xsignal(signames[i].num, handler); } diff --git a/toys/pending/init.c b/toys/pending/init.c index 97ce23b0..05afb718 100644 --- a/toys/pending/init.c +++ b/toys/pending/init.c @@ -326,7 +326,7 @@ static void set_default(void) { sigset_t signal_set_c; - xsignal_all_killers(0); + xsignal_all_killers(SIG_DFL); sigfillset(&signal_set_c); sigprocmask(SIG_UNBLOCK,&signal_set_c, NULL); -- 2.39.2