summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1997-08-25 19:05:27 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1997-08-25 19:05:27 +0000
commit43b821d5ef34d6b520fa54f5df3144510e8c31b7 (patch)
tree95a08b288379731fbaa171341956869814a3d5cd
parent44ae8d7070556faeef95a4707016114c6dbc9abf (diff)
when getting interrupt, clean up curses only if curses was active
-rw-r--r--usr.bin/systat/main.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/usr.bin/systat/main.c b/usr.bin/systat/main.c
index 9e7a411e06b..c6958a39045 100644
--- a/usr.bin/systat/main.c
+++ b/usr.bin/systat/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.12 1997/07/25 21:05:44 mickey Exp $ */
+/* $OpenBSD: main.c,v 1.13 1997/08/25 19:05:26 deraadt Exp $ */
/* $NetBSD: main.c,v 1.8 1996/05/10 23:16:36 thorpej Exp $ */
/*-
@@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/6/93";
#endif
-static char rcsid[] = "$OpenBSD: main.c,v 1.12 1997/07/25 21:05:44 mickey Exp $";
+static char rcsid[] = "$OpenBSD: main.c,v 1.13 1997/08/25 19:05:26 deraadt Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -273,10 +273,12 @@ void
die(signo)
int signo;
{
- move(CMDLINE, 0);
- clrtoeol();
- refresh();
- endwin();
+ if (wnd) {
+ move(CMDLINE, 0);
+ clrtoeol();
+ refresh();
+ endwin();
+ }
exit(0);
}