summaryrefslogtreecommitdiff
path: root/sys/kern/init_main.c
diff options
context:
space:
mode:
authorPhilip Guenthe <guenther@cvs.openbsd.org>2011-04-15 04:52:41 +0000
committerPhilip Guenthe <guenther@cvs.openbsd.org>2011-04-15 04:52:41 +0000
commit71771abcbf45c58af4735979b21a2e7604cb42bf (patch)
tree1e12c4f7e6473b7549d0bf973e6f96bd314644b8 /sys/kern/init_main.c
parent847e8a9bf0e99af86e8791ea570d84b9d3bc54f9 (diff)
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.
*/