Lock initproc when we send SIGINT to init during shutdown.

This commit is contained in:
John Baldwin 2001-03-07 02:50:09 +00:00
parent 1b43703b47
commit 87729a2b64
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=73913

View File

@ -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);