Date: 15 Jun 2000 11:30:46 -0400 From: Lowell Gilbert <lowell@world.std.com> To: dwmalone@maths.tcd.ie, freebsd-bugs@freebsd.org Subject: Re: kern/19273: Halt key for syscons. Message-ID: <44pupj0xnd.fsf@lowellg.ne.mediaone.net> In-Reply-To: dwmalone@maths.tcd.ie's message of "Wed, 14 Jun 2000 20:50:15 %2B0100 (BST)" References: <200006142050.aa81880@walton.maths.tcd.ie>
next in thread | previous in thread | raw e-mail | index | archive | help
I've handed out a patch to solve this problem in a different way: instead of setting up a different key for *every* kind of reboot, mine tries to make it easy to change (at compile time; being able to do it later would provide too much opportunity for confusion) the signal that gets generated by ctrl-alt-delete. I'm not sure which approach is better. Mr. Malone's is certainly a lot more flexible than mine in the sense of not changing what ctrl-alt- delete already does. However, flexibility may not be an advantage in this case; you don't want too many magic keyboard combinations bringing the machine down. Furthermore, my patch is *more* flexible in the sense that it lets you attach *any* signal to the ctrl-alt-delete key combo. This is useful because most of the requests I'd seen were actually for powerdown, rather than just halt, to replace reboot. Anyway, my patch is at the bottom of this message. I've never submitted it in a PR, because I've never gotten around to testing it myself (I don't reboot, except as part of system upgrades...) and none of the people I've given it to have given me the (promised, in some cases) feedback on it. But I figured I should toss it in the mix if it might get obsoleted by other changes. Be well. ================================================================ --- kern_shutdown.c~ Mon Aug 30 01:59:50 1999 +++ kern_shutdown.c Tue Mar 14 18:11:04 2000 @@ -150,6 +150,9 @@ return (0); } +#ifndef SHUTDOWN_NICE_SIGNAL +#define SHUTDOWN_NICE_SIGNAL SIGINT +#endif /* * Called by events that want to shut down.. e.g <CTL><ALT><DEL> on a PC */ @@ -158,7 +161,7 @@ { /* Send a signal to init(8) and have it shutdown the world */ if (initproc != NULL) { - psignal(initproc, SIGINT); + psignal(initproc, SHUTDOWN_NICE_SIGNAL); } else { /* No init(8) running, so simply reboot */ boot(RB_NOSYNC); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44pupj0xnd.fsf>