summaryrefslogtreecommitdiff
path: root/usr.bin/systat
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2005-08-01 22:51:51 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2005-08-01 22:51:51 +0000
commit19a43e437f4146ebfe9243c9fd105fc5976cbe9d (patch)
tree6267256b1740042c01866bca96104e64783b13a3 /usr.bin/systat
parent364f7ed676af1615fc5a695e290e9796e2673a98 (diff)
Send ourselves SIGTSTP, not SIGSTOP on ^Z. Noticed and OK deraadt@
Diffstat (limited to 'usr.bin/systat')
-rw-r--r--usr.bin/systat/keyboard.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.bin/systat/keyboard.c b/usr.bin/systat/keyboard.c
index e467eed0907..5aadd2dcb0a 100644
--- a/usr.bin/systat/keyboard.c
+++ b/usr.bin/systat/keyboard.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: keyboard.c,v 1.16 2004/07/11 05:24:56 pvalchev Exp $ */
+/* $OpenBSD: keyboard.c,v 1.17 2005/08/01 22:51:50 millert Exp $ */
/* $NetBSD: keyboard.c,v 1.2 1995/01/20 08:51:59 jtc Exp $ */
/*-
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)keyboard.c 8.1 (Berkeley) 6/6/93";
#endif
-static char rcsid[] = "$OpenBSD: keyboard.c,v 1.16 2004/07/11 05:24:56 pvalchev Exp $";
+static char rcsid[] = "$OpenBSD: keyboard.c,v 1.17 2005/08/01 22:51:50 millert Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -61,7 +61,10 @@ keyboard(void)
do {
if (gottstp) {
endwin();
- kill(getpid(), SIGSTOP);
+ signal(SIGTSTP, SIG_DFL);
+ kill(getpid(), SIGTSTP);
+ signal(SIGTSTP, sigtstp);
+ siginterrupt(SIGTSTP, 1);
gotwinch = 1;
gottstp = 0;
}