summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortim <tim>1997-07-01 20:02:07 +0000
committerToby Goodwin <toby@paccrat.org>2015-05-16 21:23:01 +0100
commit97e2ecf8267f5c91cc0d6b8b832a0aa16f1e7226 (patch)
treec4510ca27d573570c52daf60983365c7b5e4c9bb
parent60af71b51c86873430bcff673a3ecd7a45d18a6c (diff)
make sure SIGCLD is not SIG_IGN
-rw-r--r--signal.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/signal.c b/signal.c
index 11b9a66..1c3f812 100644
--- a/signal.c
+++ b/signal.c
@@ -70,4 +70,11 @@ extern void initsignal() {
signal(i, h);
sighandlers[i] = h;
}
+
+#ifdef SIGCLD
+ /* Ensure that SIGCLD is not SIG_IGN. Solaris's rshd does this. :-( */
+ h = signal(SIGCLD, SIG_DFL);
+ if (h != SIG_IGN)
+ signal(SIGCLD, h);
+#endif
}