mirror of
https://git.freebsd.org/src.git
synced 2026-01-11 19:57:22 +00:00
reboot: Fix halt -p behavior
Some checks are pending
Cross-build Kernel / amd64 ubuntu-22.04 (clang-15) (push) Waiting to run
Cross-build Kernel / aarch64 ubuntu-22.04 (clang-15) (push) Waiting to run
Cross-build Kernel / amd64 ubuntu-24.04 (clang-18) (push) Waiting to run
Cross-build Kernel / aarch64 ubuntu-24.04 (clang-18) (push) Waiting to run
Cross-build Kernel / amd64 macos-latest (clang-18) (push) Waiting to run
Cross-build Kernel / aarch64 macos-latest (clang-18) (push) Waiting to run
Some checks are pending
Cross-build Kernel / amd64 ubuntu-22.04 (clang-15) (push) Waiting to run
Cross-build Kernel / aarch64 ubuntu-22.04 (clang-15) (push) Waiting to run
Cross-build Kernel / amd64 ubuntu-24.04 (clang-18) (push) Waiting to run
Cross-build Kernel / aarch64 ubuntu-24.04 (clang-18) (push) Waiting to run
Cross-build Kernel / amd64 macos-latest (clang-18) (push) Waiting to run
Cross-build Kernel / aarch64 macos-latest (clang-18) (push) Waiting to run
The RB_HALT bit is always set when invoked as `halt`, so to maintain a
distinction between `halt` and `halt -p`, we must check the RB_POWEROFF
bit first.
PR: 291814
Fixes: 4453ec5b87 ("reboot: Default to a clean shutdown")
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D54320
This commit is contained in:
parent
a8c594d277
commit
7f39d05b67
1 changed files with 2 additions and 2 deletions
|
|
@ -235,9 +235,9 @@ shutdown(int howto)
|
|||
{
|
||||
char sigstr[SIG2STR_MAX];
|
||||
int signo =
|
||||
howto & RB_HALT ? SIGUSR1 :
|
||||
howto & RB_POWEROFF ? SIGUSR2 :
|
||||
howto & RB_POWERCYCLE ? SIGWINCH :
|
||||
howto & RB_POWEROFF ? SIGUSR2 :
|
||||
howto & RB_HALT ? SIGUSR1 :
|
||||
howto & RB_REROOT ? SIGEMT :
|
||||
SIGINT;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue