Closed jackuess closed 3 years ago
Thanks, great catch this, looks good!
Good find, glad to see this is getting fixed. We run into it from time to time, but never understood it.
echo 1 > /proc/sys/kernel/sysrq echo b > /proc/sysrq-trigger
Has been our occasional work around! haha
This seems to be inline with Busybox init, SysV init and, according to the comments in code, the intended behaviour of Finit.
The effect is that
SIGPWR
will lead to Finit issuing the syscallreboot
withcmd
parameter set toRB_POWER_OFF
(rather thanRB_AUTOBOOT
), which in turn will lead to a halt rather than a reboot. The effect of the above inside a PID namespace other than the initial PID namespace is thatwait
inside the parent of Finit will report that Finit was killed with aSIGINT
signal rather thanSIGHUP
.