[systemd-commits] src/systemctl.c TODO

Lennart Poettering lennart at kemper.freedesktop.org
Tue Jan 18 14:13:00 PST 2011


 TODO            |    2 --
 src/systemctl.c |    4 ++++
 2 files changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 4bc5f808e4c4891451b83abbc85c4830b3788782
Author: Lennart Poettering <lennart at poettering.net>
Date:   Tue Jan 18 23:12:49 2011 +0100

    systemctl: before spawning pager cache number of columns

diff --git a/TODO b/TODO
index 48f4628..ace7465 100644
--- 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
diff --git a/src/systemctl.c b/src/systemctl.c
index 4f4ee96..2c8c2cf 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;



More information about the systemd-commits mailing list