OSDN Git Service

I discovered that the reason SIGINT causes a reboot on sysvinit is that
authorIsaac Dunham <ibid.ag@gmail.com>
Thu, 20 Aug 2015 16:49:16 +0000 (11:49 -0500)
committerRob Landley <rob@landley.net>
Thu, 20 Aug 2015 16:49:16 +0000 (11:49 -0500)
commit92f3b785690f5c23e1b84b6e726d7859d0ab1608
tree327dc8a73c8e58c1356d320bc4081b66491f2dab
parent4e49e2cca731f2e1dd01ebc5163beb71e0d640ec
I discovered that the reason SIGINT causes a reboot on sysvinit is that
it's how the kernel signals that ctrl-alt-delete has been pressed;
thus, setting it as the signal for reboot prevents ctrlaltdel scripts
from working.
SIGTERM is what Busybox uses, so we might as well be compatible.
toys/other/reboot.c
toys/pending/init.c