mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-22 17:54:52 +00:00
Lock initproc when we send SIGINT to init during shutdown.
This commit is contained in:
parent
1b43703b47
commit
87729a2b64
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=73913
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue