diff options
| author | Toby Goodwin <tjg@star.le.ac.uk> | 1999-12-10 11:55:04 +0000 |
|---|---|---|
| committer | Toby Goodwin <toby@paccrat.org> | 2015-05-16 21:22:10 +0100 |
| commit | 14106ccc3b2cb03c8b9a1df1a1b3e3953aaee2f8 (patch) | |
| tree | bf26805b81698d4ca6f9e7aa7bce3580805286fc /signal.c | |
| parent | 3e9e4d3f8f518f8f467066593ae6f270d97f6d60 (diff) | |
beta: rc-1.6b2
Diffstat (limited to 'signal.c')
| -rw-r--r-- | signal.c | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -85,19 +85,19 @@ extern void initsignal() { void (*h)(int); int i; - for (i = 1; i < NUMOFSIGNALS; i++) { - h = sys_signal(i, SIG_DFL); - if (h != SIG_DFL && h != SIG_ERR) - sys_signal(i, h); - sighandlers[i] = h; - } - #if HAVE_SYSV_SIGCLD /* Ensure that SIGCLD is not SIG_IGN. Solaris's rshd does this. :-( */ - h = sys_signal(SIGCLD, SIG_DFL); + h = sys_signal(SIGCLD, SIG_IGN); if (h != SIG_IGN && h != SIG_ERR) sys_signal(SIGCLD, h); else - sighandlers[SIGCLD] = SIG_DFL; + sys_signal(SIGCLD, SIG_DFL); #endif + + for (i = 1; i < NUMOFSIGNALS; i++) { + h = sys_signal(i, SIG_IGN); + if (h != SIG_IGN && h != SIG_ERR) + sys_signal(i, h); + sighandlers[i] = h; + } } |