diff options
| author | Toby Goodwin <toby@paccrat.org> | 2018-03-01 21:37:18 +0000 |
|---|---|---|
| committer | Toby Goodwin <toby@paccrat.org> | 2018-03-01 21:37:18 +0000 |
| commit | 5b624196125034b95d504be682127a5964e08da5 (patch) | |
| tree | 56d3477069e7541dcb67f36fc3b960f6f9abe076 /fn.c | |
| parent | 5966ab2ca2632c5bed9815def1add4859beececa (diff) | |
| parent | 67a87ad0104d88e8b1711a3831d616598edb30c2 (diff) | |
Merge branch 'master' into ifnot
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 */ |