diff options
author | Rob Landley <rob@landley.net> | 2018-10-10 05:26:02 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2018-10-10 05:26:02 -0500 |
commit | c276b8a8c2a5181558b976b9cb1d60a0180d560e (patch) | |
tree | f2f6cd6bff76573b2a94ade1d0cdadce654a323a /lib/lib.c | |
parent | 1f73aace0feb60ce1b200e7bf8e8339c1e2994fa (diff) | |
download | toybox-c276b8a8c2a5181558b976b9cb1d60a0180d560e.tar.gz |
Add xsignal_flags() and more consistently use xsignal() instead of signal().
xsignal() wraps sigaction() giving control of SA_RESTART behavior and such.
Diffstat (limited to 'lib/lib.c')
-rw-r--r-- | lib/lib.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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; |