Re: What to do on ctrl-alt-del?

Ben Clifford (
Tue, 15 Jul 1997 20:38:29 +0000 (GMT)

On Tue, 15 Jul 1997, Hubert Mantel wrote:

> This is exactly the problem: You do not get the signal when the user
> presses ctrl-alt-del. There is no way to tell the kernel to send you a
> signal. If you disable ctrl-alt-del (using reboot(2)), a signal will be
> sent to pid 1. This pid is hardcoded in the kernel. This is exactly the
> reason why I wanted to address the problem and change the current
> behaviour (send SIGINT to the process that has disabled ctrl-alt-del).
> > The shell does have a 'trap' builtin, after all...
> Linuxrc is not necessarily a shell script. In this case it is a binary.
> Even if it were a shell script, the trap would not help because the signal
> is not delivered to the script.

If linuxrc is a shell script, then signalling the process which
disabled ctrl-alt-del won't work either - the process which disabled it
will have terminated.

Perhaps a new case in sys_reboot(), LINUX_REBOOT_CMD_CAT_NOTIFYPID, which
would take a parameter specifying which PID should be notified. A new
version of /sbin/ctrlaltdel could then optionally set the notify process
to its parent, so a script linuxrc could receive the signals, and a binary
linuxrc could set the process to itself, giving the effect your suggestion