aboutsummaryrefslogtreecommitdiff
path: root/lib/lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/lib.c')
-rw-r--r--lib/lib.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/lib.c b/lib/lib.c
index 17a4f483..9deadad9 100644
--- a/lib/lib.c
+++ b/lib/lib.c
@@ -854,7 +854,9 @@ void sigatexit(void *handler)
int i;
for (i=0; signames[i].num != SIGCHLD; i++)
- signal(signames[i].num, handler ? exit_signal : SIG_DFL);
+ if (signames[i].num != SIGKILL)
+ xsignal(signames[i].num, handler ? exit_signal : SIG_DFL);
+
if (handler) {
al = xmalloc(sizeof(struct arg_list));
al->next = toys.xexit;