summaryrefslogtreecommitdiffstats
path: root/sys/kern/init_main.c
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2011-07-05 04:48:01 +0000
committerguenther <guenther@openbsd.org>2011-07-05 04:48:01 +0000
commit2725dadd7d788089a9902b44feabed3569fc8616 (patch)
tree247079b02db228e6a9ab47389f8b56deba8cab5f /sys/kern/init_main.c
parentSync to bsd.lv (all coded by kristaps@): (diff)
downloadwireguard-openbsd-2725dadd7d788089a9902b44feabed3569fc8616.tar.xz
wireguard-openbsd-2725dadd7d788089a9902b44feabed3569fc8616.zip
Recommit the reverted sigacts change now that the NFS use-after-free
problem has been tracked down. This fixes the sharing of the signal handling state: shared bits go in sigacts, per-rthread bits goes in struct proc. ok deraadt@
Diffstat (limited to 'sys/kern/init_main.c')
-rw-r--r--sys/kern/init_main.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c
index 43dc7f0cb67..4d632a549d8 100644
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: init_main.c,v 1.177 2011/04/18 21:44:56 guenther Exp $ */
+/* $OpenBSD: init_main.c,v 1.178 2011/07/05 04:48:02 guenther Exp $ */
/* $NetBSD: init_main.c,v 1.84.4.1 1996/06/02 09:08:06 mrg Exp $ */
/*
@@ -283,7 +283,7 @@ main(void *framep)
session0.s_count = 1;
session0.s_leader = pr;
- atomic_setbits_int(&p->p_flag, P_SYSTEM | P_NOCLDWAIT);
+ atomic_setbits_int(&p->p_flag, P_SYSTEM);
p->p_stat = SONPROC;
pr->ps_nice = NZERO;
p->p_emul = &emul_native;
@@ -615,6 +615,9 @@ start_init(void *arg)
check_console(p);
+ /* process 0 ignores SIGCHLD, but we can't */
+ p->p_sigacts->ps_flags = 0;
+
/*
* Need just enough stack to hold the faked-up "execve()" arguments.
*/