> Linux 3.0.0 and 3.6.11 do not mask any signals. Neither do Linux 2.6.32 or 3.2.34, in my experience.
> kernel (hd0,0)/vmlinuz-... root=/dev/sda2 init=/root/a.out Depending on your kernel, it may be a little more complicated than that. If your kernel has been compiled with an initramfs, the first userland process won't be /root/a.out, but the /init file in the initramfs. If that /init file is a script, then the first userland process is the script interpreter. > 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. > 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 For shell scripts, remember that process 1 is the shell itself, not the subprocesses, so no specific signal handling is needed. The shell performs enough signal handling by default. > Anyway, this little test also reveals that (as I thought I remembered) > you have to make a special syscall to get the ctrl-alt-del behavior. > Namely, > > reboot(RB_DISABLE_CAD); > > causes the system to stop instantly rebooting when ctrl-alt-del is > pressed, and instead send SIGINT to pid 1. I'm not even sure if > there is a command-line access to this call. echo 0 > /proc/sys/kernel/ctrl-alt-del -- Laurent _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
