CTRL-ALT-DEL not working as expected. Seeking for advices

Harald Becker ralda at gmx.de
Wed Feb 19 14:58:26 UTC 2014


Hi Denys !

On 19-02-2014 15:35 Denys Vlasenko <vda.linux at googlemail.com>
wrote:
>On Wed, Feb 19, 2014 at 2:48 PM, Harald Becker <ralda at gmx.de>
>wrote:
>> On 19-02-2014 14:31 Denys Vlasenko <vda.linux at googlemail.com>
>> wrote:
>>>> # Trap CTRL-ALT-DELETE
>>>> null::ctrlaltdel:/sbin/reboot
>>
>>>Pressing CTRL-ALT-DEL sends SIGINT signal to process 1.
>>>You want to make sure it reaches it.
>>
>> Don't forget to set /proc/sys/kernel/ctrl-alt-del to "0" (zero)
>> to enable sending SIGINT to the init process.
>>
>> e.g.: echo "0" >/proc/sys/kernel/ctrl-alt-del
>>
>> Without this most Linux kernel try an immediate reboot without
>> saving buffers etc., know to fail/hang on some emulators.
>
>init.c does that already:
>
>                /* Turn off rebooting via CTL-ALT-DEL - we get a
>                 * SIGINT on CAD so we can shut things down
> gracefully... */ reboot(RB_DISABLE_CAD); /* misnomer */

Outch! ... if you do this before proc is mounted and system is
prepared successfully, most emulators fail and many linux systems
just hang when they receive a ctrl-alt-del. The command is right
(same as writing to /proc/sys/kernel/ctrl-alt-del) but time to do
this is wrong. Move that behind the initial system setup, then
enable ctrl-alt-del. As I had several trouble with Busybox init,
I dropped that and replaced it with my own programs, so I didn't
note earlier the wrong time you enable ctrl-alt-del in BB init.

I do not know what's the reason for this. I just found it
necessary to enable ctrl-alt-del at the right time in system
setup (and not earlier). Had several kinds of trouble on system
startup, when ctrl-alt-del is enabled to early and one presses
ctrl-alt-del. I did never look or try to analyze this.

--
Harald


More information about the busybox mailing list