summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorStuart Henderson <sthen@cvs.openbsd.org>2009-06-04 19:01:31 +0000
committerStuart Henderson <sthen@cvs.openbsd.org>2009-06-04 19:01:31 +0000
commite1ec38aec35560b049c139e8ef787c27013998b0 (patch)
tree004dc19c4464e28a5d6db64468df5017d7f10f4d /usr.bin
parent0cc541e66cc89d9ff99600850b9bb10730b4ec86 (diff)
with -d1, switch interactive mode off, so the screen isn't restored
immediately afterwards on a smart terminal. found by claudio@. "I like that diff" deraadt "yes please!" phessler "I think that makes sense" claudio
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/top/top.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/top/top.c b/usr.bin/top/top.c
index 579f8bc7cdb..6db7345dd5b 100644
--- a/usr.bin/top/top.c
+++ b/usr.bin/top/top.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: top.c,v 1.65 2007/11/29 10:06:30 otto Exp $ */
+/* $OpenBSD: top.c,v 1.66 2009/06/04 19:01:30 sthen Exp $ */
/*
* Top users/processes display for Unix
@@ -190,6 +190,8 @@ parseargs(int ac, char **av)
case 'd': /* number of displays to show */
if ((i = atoiwi(optarg)) != Invalid && i != 0) {
displays = i;
+ if (displays == 1)
+ interactive = No;
break;
}
new_message(MT_delayed,