The rig PID 1 is a busybox sh script; busybox reboot/poweroff/halt only signal PID 1, and the kernel drops signals PID 1 does not handle, so a plain reboot did nothing on the rig (found by flare-edge#96: Settings > System > Reboot).
warden_trap_power_signals (etc/warden-lib.sh): TERM/USR2/USR1 perform the -f action after a sync.
warden_idle_forever: sleep & wait, so the trap runs at once.
qemu/tests/init-power-signals-test.sh in CI: runs the real helpers with stub commands and sends each signal.
Fixes #5.
The rig PID 1 is a busybox sh script; busybox reboot/poweroff/halt only signal PID 1, and the kernel drops signals PID 1 does not handle, so a plain `reboot` did nothing on the rig (found by flare-edge#96: Settings > System > Reboot).
- `warden_trap_power_signals` (etc/warden-lib.sh): TERM/USR2/USR1 perform the `-f` action after a sync.
- `warden_idle_forever`: `sleep & wait`, so the trap runs at once.
- `qemu/tests/init-power-signals-test.sh` in CI: runs the real helpers with stub commands and sends each signal.
| Check | Result |
|---|---|
| init-power-signals-test.sh | 3/3 PASS |
| Mutation: TERM trap removed | FAIL caught |
| Mutation: foreground sleep | 3 FAIL caught, no hang |
| shellcheck | clean |
Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01441BzdGcvQmXkiN2qDjfZg
The stage-2 init is a busybox sh script running as PID 1. Busybox reboot,
poweroff and halt only signal PID 1 (TERM, USR2, USR1), and the kernel
drops a signal PID 1 has no handler for, so a plain reboot did nothing on
the rig while a panel's busybox init honours it. Settings > System >
Reboot hit exactly that (flare-edge#96).
warden_trap_power_signals performs the -f action after a sync, and
warden_idle_forever idles with sleep & wait so the trap runs at once
instead of after an hour-long foreground sleep.
Test: qemu/tests/init-power-signals-test.sh runs the real helpers in sh
with stub commands and sends each signal; it fails without the traps and
with a foreground sleep, and cannot hang on failure.
Fixes#5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01441BzdGcvQmXkiN2qDjfZg
noah
merged commit 317ae087fd into flare-edge-next2026-09-28 13:07:22 -06:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Fixes #5.
The rig PID 1 is a busybox sh script; busybox reboot/poweroff/halt only signal PID 1, and the kernel drops signals PID 1 does not handle, so a plain
rebootdid nothing on the rig (found by flare-edge#96: Settings > System > Reboot).warden_trap_power_signals(etc/warden-lib.sh): TERM/USR2/USR1 perform the-faction after a sync.warden_idle_forever:sleep & wait, so the trap runs at once.qemu/tests/init-power-signals-test.shin CI: runs the real helpers with stub commands and sends each signal.Generated with Claude Code
https://claude.ai/code/session_01441BzdGcvQmXkiN2qDjfZg