summaryrefslogtreecommitdiffstats
path: root/contrib/top
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2012-03-07 18:05:45 +0000
committerkib <kib@FreeBSD.org>2012-03-07 18:05:45 +0000
commit9aeef561833ba00c4d4fd175b6d20d03b0deecae (patch)
treecf964d80a71e50a72d8a22fb84734ac86f8a7c08 /contrib/top
parente68655dbd3f2a55d7d30f58921dbcabea0043d2e (diff)
downloadFreeBSD-src-9aeef561833ba00c4d4fd175b6d20d03b0deecae.zip
FreeBSD-src-9aeef561833ba00c4d4fd175b6d20d03b0deecae.tar.gz
In batch mode, exit after receiving SIGINT, instead of immediate
output of the next display. Submitted by: Andrey Zonov <andrey zonov org> MFC after: 1 week
Diffstat (limited to 'contrib/top')
-rw-r--r--contrib/top/top.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/contrib/top/top.c b/contrib/top/top.c
index aaab027..50bc9b9 100644
--- a/contrib/top/top.c
+++ b/contrib/top/top.c
@@ -723,6 +723,10 @@ restart:
if (!interactive)
{
sleep(delay);
+ if (leaveflag) {
+ end_screen();
+ exit(0);
+ }
}
else while (no_command)
{
OpenPOWER on IntegriCloud