From 9ed95f433630f11c54e852f2826e9d68efff81f0 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 31 Aug 2010 16:53:58 +0200 Subject: [PATCH] util: look at STDOUT, not STDIN, when determining tty columns https://bugzilla.redhat.com/show_bug.cgi?id=626891 --- src/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util.c b/src/util.c index a09b704ff..f982586ce 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; } -- 2.30.2