diff options
author | jhb <jhb@FreeBSD.org> | 2001-03-07 02:50:09 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2001-03-07 02:50:09 +0000 |
commit | 7c5cd82d2e510a5658b6edc44eb83a4927ab8a2e (patch) | |
tree | b0e4eb541eeb7bb469c20e88809a6b1e36e68d7f /sys | |
parent | 46333fa556c039ed915ed4cab16345fcb3a7c0c1 (diff) | |
download | FreeBSD-src-7c5cd82d2e510a5658b6edc44eb83a4927ab8a2e.zip FreeBSD-src-7c5cd82d2e510a5658b6edc44eb83a4927ab8a2e.tar.gz |
Lock initproc when we send SIGINT to init during shutdown.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/kern_shutdown.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/kern_shutdown.c b/sys/kern/kern_shutdown.c index f2190d0..637d01c 100644 --- a/sys/kern/kern_shutdown.c +++ b/sys/kern/kern_shutdown.c @@ -157,7 +157,9 @@ shutdown_nice(int howto) /* Send a signal to init(8) and have it shutdown the world */ if (initproc != NULL) { + PROC_LOCK(initproc); psignal(initproc, SIGINT); + PROC_UNLOCK(initproc); } else { /* No init(8) running, so simply reboot */ boot(RB_NOSYNC); |