mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-28 11:57:28 +00:00
Handle RB_POWERCYCLE in the MI part of the kernel
Signal init with SIGWINCH in shutdown_nice for RB_POWERCYCLE. Sponsored by: Netflix
This commit is contained in:
parent
35c1d16e3e
commit
7d41b6f078
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=324988
@ -283,6 +283,8 @@ shutdown_nice(int howto)
|
||||
PROC_LOCK(initproc);
|
||||
if (howto & RB_POWEROFF)
|
||||
kern_psignal(initproc, SIGUSR2);
|
||||
else if (howto & RB_POWERCYCLE)
|
||||
kern_psignal(initproc, SIGWINCH);
|
||||
else if (howto & RB_HALT)
|
||||
kern_psignal(initproc, SIGUSR1);
|
||||
else
|
||||
@ -817,7 +819,7 @@ static void
|
||||
poweroff_wait(void *junk, int howto)
|
||||
{
|
||||
|
||||
if (!(howto & RB_POWEROFF) || poweroff_delay <= 0)
|
||||
if ((howto & (RB_POWEROFF | RB_POWERCYCLE)) == 0 || poweroff_delay <= 0)
|
||||
return;
|
||||
DELAY(poweroff_delay * 1000);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user