diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1999-07-06 07:59:55 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1999-07-06 07:59:55 +0000 |
commit | 68e42965775d31b5ace444812c7f9123cf5ab995 (patch) | |
tree | 815d312435059e312fb637f6b1650ff0429c5580 /sys/arch/i386/isa/pcvt | |
parent | 3147963759c7c78f70cd12e9cea49a38d289688d (diff) |
for CTRL-ALT-DEL, send SIGUSR1 to initproc
Diffstat (limited to 'sys/arch/i386/isa/pcvt')
-rw-r--r-- | sys/arch/i386/isa/pcvt/pcvt_kbd.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/sys/arch/i386/isa/pcvt/pcvt_kbd.c b/sys/arch/i386/isa/pcvt/pcvt_kbd.c index c56446626e4..293955e4ef3 100644 --- a/sys/arch/i386/isa/pcvt/pcvt_kbd.c +++ b/sys/arch/i386/isa/pcvt/pcvt_kbd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pcvt_kbd.c,v 1.19 1998/09/06 23:00:03 niklas Exp $ */ +/* $OpenBSD: pcvt_kbd.c,v 1.20 1999/07/06 07:59:54 deraadt Exp $ */ /* * Copyright (c) 1992, 1995 Hellmuth Michaelis and Joerg Wunsch. @@ -115,6 +115,8 @@ static int tpmrate = KBD_TPD500|KBD_TPM100; static u_char altkpflag = 0; static u_short altkpval = 0; +extern int kbd_reset; + #if PCVT_SHOWKEYS u_char rawkeybuf[80]; #endif @@ -1472,10 +1474,11 @@ regular: kbd_status.extended = kbd_status.ext1 = 0; -#if PCVT_CTRL_ALT_DEL /* Check for cntl-alt-del */ - if((key == 76) && ctrl_down && (meta_down||altgr_down)) - cpu_reset(); -#endif /* PCVT_CTRL_ALT_DEL */ + if(kbd_reset && (key == 76) && ctrl_down && (meta_down||altgr_down)) { + printf("\nconsole halt requested: going down.\n"); + kbd_reset = 0; + psignal(initproc, SIGUSR1); + } #if NDDB > 0 || defined(DDB) /* Check for cntl-alt-esc */ |