Subject: Re: ctrl+alt+del
To: None <>
From: Greg A. Woods <>
List: netbsd-users
Date: 06/10/2001 13:41:25
[ On Sunday, June 10, 2001 at 11:11:12 (+0200), Martin Husemann wrote: ]
> Subject: Re: ctrl+alt+del
> The "how" this should be communicated to userland, and what should happen
> there, is the core of the tech-kern discussion referenced in this thread
> already.
> IMHO it should be special cased and send SIGPWR to init, which then would
> run a special script (like /etc/powerdown) if it exists, otherwise ignore
> the signal.

Pushing back to userlevel defeats the purpose.

SIGPWR to init is a good idea for any system with a soft-power switch,
but it's a *bad* idea for <ctrl+alt+del> since it doesn't add anything
that can't be done better in other ways.

I think maybe on i386 <ctrl+alt+del> should also invoke the kernel
debugger, if it's available, and then the debugger can print a helpful
little message that tells people who "forget" that they can type
"reboot" to reboot, or "continue" to return to the system (eg. to do a
"normal" or "proper" shutdown).  Even the most clueless luser should be
able to figure this much out and it gives people building turn-key
systems a decent fail-safe that on an otherwise wedged system will allow
at least the disks to be sync'ed if at all possible.

However if the debugger is not available then nothing should happen
(except maybe a little kernel printf saying "no debugger support" or
some such).  I don't see any reason why people who want a keyboard hook
into the kernel to reboot the system can't use the debugger to do it;
and there must remain away for people who don't want this functionality
to disable it (the latter have got to also remove the debugger anyway).

I.e. the only correct way to support <ctrl+alt+del> on i386 (and any
other port that wants to mimic a PC) should be through the debugger.  I
don't see any benefit to hooking it directly to the debugger's "reboot"
function either -- the extra command is _not_ a burden when you're
contemplating such a drastic action.  Even worse forcing an immediate
reboot from the keyboard would be very un-unix-like (even BSD/OS asks
"reboot? (y/n)").

							Greg A. Woods

+1 416 218-0098      VE3TCP      <>     <>
Planix, Inc. <>;   Secrets of the Weird <>