lkml.org 
[lkml]   [1997]   [Jul]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: What to do on ctrl-alt-del?


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
provides.


\
 
 \ /
  Last update: 2005-03-22 13:39    [W:0.072 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site