diff options
| author | INAGAKI Hiroshi | 2025-12-13 10:31:03 +0000 |
|---|---|---|
| committer | Alexander Couzens | 2026-02-13 10:11:48 +0000 |
| commit | 9493a3dcb48b9b3e197e9edfc37304fcd1b5acae (patch) | |
| tree | b07f9a358178cd3526a6ec78563ac0f22a4611f8 | |
| parent | 4dd22d022f9fa05fda1871505a003cb40378ff3e (diff) | |
signal: handle SIGUSR1 as halt
The SIGUSR1 (10) signal sent from BusyBox halt is for halt, so set the
RB_HALT_SYSTEM to event instead of RB_POWER_OFF for system call.
Link: https://github.com/openwrt/procd/pull/25/commits
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
| -rw-r--r-- | signal.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -43,6 +43,9 @@ static void signal_shutdown(int signal, siginfo_t *siginfo, void *data) msg = "reboot"; break; case SIGUSR1: + event = RB_HALT_SYSTEM; + msg = "halt"; + break; case SIGUSR2: case SIGPWR: event = RB_POWER_OFF; |