From 7c5cd82d2e510a5658b6edc44eb83a4927ab8a2e Mon Sep 17 00:00:00 2001 From: jhb Date: Wed, 7 Mar 2001 02:50:09 +0000 Subject: [PATCH] Lock initproc when we send SIGINT to init during shutdown. --- sys/kern/kern_shutdown.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/kern/kern_shutdown.c b/sys/kern/kern_shutdown.c index f2190d02f3a8..637d01c0a263 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);