summaryrefslogtreecommitdiff
path: root/src/cgtop
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-05-30 18:23:54 +0200
committerLennart Poettering <lennart@poettering.net>2016-05-30 18:23:54 +0200
commitac96418b4f16c2a0acd2e4981e533c00fe21bdf1 (patch)
tree91b0a8925260b5e8ff2a468069f1f4287c84c5c6 /src/cgtop
parent7565bb98a45c51c7a79cbeda9905e5364c49e374 (diff)
pager: don't start pager if the terminal is explicitly set to TERM=dumb
As suggested here: https://bugs.freedesktop.org/show_bug.cgi?id=64737#c8 This adds a new call terminal_is_dumb() and makes use of this where appropriate.
Diffstat (limited to 'src/cgtop')
-rw-r--r--src/cgtop/cgtop.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cgtop/cgtop.c b/src/cgtop/cgtop.c
index e088e4b197..33379eb9bd 100644
--- a/src/cgtop/cgtop.c
+++ b/src/cgtop/cgtop.c
@@ -558,7 +558,7 @@ static void display(Hashmap *a) {
assert(a);
- if (on_tty())
+ if (!terminal_is_dumb())
fputs(ANSI_HOME_CLEAR, stdout);
array = alloca(sizeof(Group*) * hashmap_size(a));