summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2002-01-19 19:00:14 +0000
committermillert <millert@openbsd.org>2002-01-19 19:00:14 +0000
commit68f84ab80b3934cdcebf8d88e04a24b8825e3681 (patch)
tree665957f86caad4420ce6d864d7bb8d78248d2f79
parentsync (diff)
downloadwireguard-openbsd-68f84ab80b3934cdcebf8d88e04a24b8825e3681.tar.xz
wireguard-openbsd-68f84ab80b3934cdcebf8d88e04a24b8825e3681.zip
If handler for SIGCHLD is SIG_IGN, reset to SIG_DLF. This is consistent
with our handling of SA_NOCLDWAIT as well as other operating systems. From FreeBSD.
-rw-r--r--sys/kern/kern_sig.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c
index 780b1d7bc6e..c0fd97f1021 100644
--- a/sys/kern/kern_sig.c
+++ b/sys/kern/kern_sig.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_sig.c,v 1.51 2002/01/07 16:16:32 millert Exp $ */
+/* $OpenBSD: kern_sig.c,v 1.52 2002/01/19 19:00:14 millert Exp $ */
/* $NetBSD: kern_sig.c,v 1.54 1996/04/22 01:38:32 christos Exp $ */
/*
@@ -415,6 +415,8 @@ execsigs(p)
ps->ps_sigstk.ss_sp = 0;
ps->ps_flags = 0;
p->p_flag &= ~P_NOCLDWAIT;
+ if (ps->ps_sigact[SIGCHLD] == SIG_IGN)
+ ps->ps_sigact[SIGCHLD] = SIG_DFL;
}
/*