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

Michael Conrad mconrad at intellitree.com
Sat Mar 30 18:35:39 UTC 2013


On 03/30/2013 05:34 AM, Laurent Bercot wrote:

>> So perhaps the confusion is that Linux is simply not delivering
>> the signal (regardless of sigprocmask) unless you install a signal
>> handler.
>   No, this is not the problem. Every shell in the world traps SIGINT.

Hm, true...  but then the problem you actually have is that there
might be signals that the shell is allowing to be delivered that you
didn't expect.

>> I question whether anyone would actually want to write a
>> shell script with signal handling to act as "init"...  that seems
>> messy and error prone.
>   Lots of people do that, and for good reasons: see
>   http://skarnet.org/software/s6/s6-svscan-1.html

You make great arguments for stage 1 and 3, but it still seems a
shell is ill-suited for stage 2.  You would have to handle any
signal where you didn't want the shell's default behavior, and
if I remember right, there was also a trick needed to get the
shell to reap zombies.

It just seems too easy to write a tiny C program that
   1 - launches a supervisor
   2 - reaps zombies
   3 - runs a script when it receives signals
   4 - execs stage 3 when the supervisor exits

Not to mention the large number of supervisor programs that
already do this.

I use shells as init sometimes, but mostly just for diagnostics.

>> I'm not even sure if there is a command-line access to this call.
>   echo 0 > /proc/sys/kernel/ctrl-alt-del

Ah, nice.

-Mike



More information about the busybox mailing list