From 68e42965775d31b5ace444812c7f9123cf5ab995 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Tue, 6 Jul 1999 07:59:55 +0000 Subject: for CTRL-ALT-DEL, send SIGUSR1 to initproc --- sys/arch/i386/isa/pcvt/pcvt_kbd.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'sys/arch/i386/isa') 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 */ -- cgit v1.2.3