summaryrefslogtreecommitdiff
path: root/src/systemctl.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-01-18 23:12:49 +0100
committerLennart Poettering <lennart@poettering.net>2011-01-18 23:12:49 +0100
commit4bc5f808e4c4891451b83abbc85c4830b3788782 (patch)
tree4bf072dd489e807d008f93749d12cfde308158c7 /src/systemctl.c
parent3add4d215b30c746ee617d7412ee007ed3c87249 (diff)
systemctl: before spawning pager cache number of columns
Diffstat (limited to 'src/systemctl.c')
-rw-r--r--src/systemctl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/systemctl.c b/src/systemctl.c
index 4f4ee96172..2c8c2cf61d 100644
--- a/src/systemctl.c
+++ b/src/systemctl.c
@@ -5316,6 +5316,10 @@ static void pager_open(void) {
if (!*pager || streq(pager, "cat"))
return;
+ /* Determine and cache number of columns before we spawn the
+ * pager so that we get the value from the actual tty */
+ columns();
+
if (pipe(fd) < 0) {
log_error("Failed to create pager pipe: %m");
return;