From: Lennart Poettering Date: Tue, 31 Aug 2010 14:53:58 +0000 (+0200) Subject: util: look at STDOUT, not STDIN, when determining tty columns X-Git-Tag: v9~24 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9ed95f433630f11c54e852f2826e9d68efff81f0;p=systemd util: look at STDOUT, not STDIN, when determining tty columns https://bugzilla.redhat.com/show_bug.cgi?id=626891 --- diff --git a/src/util.c b/src/util.c index a09b704f..f982586c 100644 --- a/src/util.c +++ b/src/util.c @@ -2988,7 +2988,7 @@ int columns(void) { struct winsize ws; zero(ws); - if (ioctl(STDIN_FILENO, TIOCGWINSZ, &ws) >= 0) + if (ioctl(STDOUT_FILENO, TIOCGWINSZ, &ws) >= 0) parsed_columns = ws.ws_col; }