]> err.no Git - systemd/commitdiff
systemctl: before spawning pager cache number of columns
authorLennart Poettering <lennart@poettering.net>
Tue, 18 Jan 2011 22:12:49 +0000 (23:12 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 18 Jan 2011 22:12:49 +0000 (23:12 +0100)
TODO
src/systemctl.c

diff --git a/TODO b/TODO
index 48f4628abf38fbcba213810334227856450d1dea..ace7465c7182b9ed53d62dee9f585917365c9bb9 100644 (file)
--- a/TODO
+++ b/TODO
@@ -11,8 +11,6 @@
 * sometimes processes seem to remain when we kill a service
   http://lists.fedoraproject.org/pipermail/devel/2011-January/147559.html
 
-* when launching pager, take number of columns first
-
 * support remote/ssh systemctl/systemadm, and local privileged access
 
 * finish syslog socket stuff
index 4f4ee961726ed7a6595bab372cc21f2294771e4d..2c8c2cf61d5165036beffe54ec8784a67dc0a2e1 100644 (file)
@@ -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;