[PATCH] init: Add handshake to poweroff/reboot for signal handler setup

Denys Vlasenko vda.linux at googlemail.com
Thu Feb 15 23:09:59 UTC 2018


On Thu, Feb 15, 2018 at 10:52 PM, Deb McLemore <debmc at linux.vnet.ibm.com> wrote:
> Any logic attempting to guess at the state of startup will give false
> confidence that the signaling setup is completed.

The case of init not being ready to handle its duties for an extremely
early process is in itself a rather corner case. I would imagine
some people seeing as a bug, and maybe even having kernel fixed
to avoid it.

I can just disagree to cater for this case and propose people affected
by it to have a special /sbin/poweroff script with whatever magic they want.
E.g.:

#!/bin/sh
while true; do
    /bin/busybox poweroff "$@"
    /bin/sleep 1
done

So far I'm open to adding a workaround in poweroff code, if it's not
adding stuff to the init per se - why add bloat to the process which
is always there?


More information about the busybox mailing list