mirror of
https://github.com/clearlinux/systemd-stable.git
synced 2026-10-04 15:58:29 +00:00
util: look at STDOUT, not STDIN, when determining tty columns
https://bugzilla.redhat.com/show_bug.cgi?id=626891
This commit is contained in:
+1
-1
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user