diff options
| author | Toby Goodwin <toby@paccrat.org> | 2018-02-17 16:03:30 +0000 |
|---|---|---|
| committer | Toby Goodwin <toby@paccrat.org> | 2018-02-17 16:03:30 +0000 |
| commit | 67a87ad0104d88e8b1711a3831d616598edb30c2 (patch) | |
| tree | ebd5d0a9cd3df379174742b00fcbff58eedd5969 /fn.c | |
| parent | dff49d84c0ef9880b191ebbaac2cf65a17eb481a (diff) | |
remove all references to SIGCLD
Diffstat (limited to 'fn.c')
| -rw-r--r-- | fn.c | 11 |
1 files changed, 3 insertions, 8 deletions
@@ -29,10 +29,7 @@ extern void inithandler() { null.type = nBody; null.u[0].p = null.u[1].p = NULL; for (i = 1; i < NUMOFSIGNALS; i++) -#if HAVE_SYSV_SIGCLD - if (i != SIGCLD) -#endif - if (sighandlers[i] == SIG_IGN) + if (i != SIGCHLD && sighandlers[i] == SIG_IGN) fnassign(signals[i].name, NULL); /* ignore incoming ignored signals */ if (interactive || sighandlers[SIGINT] != SIG_IGN) { def_sigint = sigint; @@ -151,10 +148,8 @@ extern void fnassign(char *name, Node *def) { new->def = newdef; new->extdef = NULL; if (strncmp(name, "sig", conststrlen("sig")) == 0) { /* slight optimization */ -#if HAVE_SYSV_SIGCLD /* System V machines treat SIGCLD very specially */ - if (streq(name, "sigcld")) - rc_error("can't trap SIGCLD"); -#endif + if (streq(name, "sigchld") || streq(name, "sigcld")) + rc_error("can't trap SIGCHLD"); if (streq(name, "sigexit")) runexit = TRUE; for (i = 1; i < NUMOFSIGNALS; i++) /* zero is a bogus signal */ |