summaryrefslogtreecommitdiffstats
path: root/sys/kern/init_main.c
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2011-04-15 04:52:39 +0000
committerguenther <guenther@openbsd.org>2011-04-15 04:52:39 +0000
commit4dec2d3cb6dfb165c5fbac58485496efe3408afc (patch)
treeb6a1f9c45071d4c3e150d83b7188558aa575f769 /sys/kern/init_main.c
parentNo need to make depend kernels (diff)
downloadwireguard-openbsd-4dec2d3cb6dfb165c5fbac58485496efe3408afc.tar.xz
wireguard-openbsd-4dec2d3cb6dfb165c5fbac58485496efe3408afc.zip
Correct the sharing of the signal handling state: stuff that should
be shared (p_sigignore, p_sigcatch, P_NOCLDSTOP, P_NOCLDWAIT) moves to struct sigacts, wihle stuff that should be per rthread (ps_oldmask, SAS_OLDMASK, ps_sigstk) moves to struct proc. Treat the coredumping state bits (ps_sig, ps_code, ps_type, ps_sigval) as per-rthread until our locking around coredumping is better. Oh, and remove the old SunOS-compat ps_usertramp member. "I like the sound of this" tedu@
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 84dc1943c12..5c5025ef1c3 100644
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: init_main.c,v 1.175 2011/03/07 07:07:13 guenther Exp $ */
+/* $OpenBSD: init_main.c,v 1.176 2011/04/15 04:52:40 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.
*/