aboutsummaryrefslogtreecommitdiff
path: root/procps/ps.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-08-09 08:27:24 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-08-09 08:27:24 +0000
commitf893da875a24138fac30f070c7101b5330f0fef0 (patch)
treeede441ba82f7a1bf9942ba33a64e91bcd8173920 /procps/ps.c
parent501bfe2630054f9988e08a5d77e1b1ff2abc78bb (diff)
downloadbusybox-f893da875a24138fac30f070c7101b5330f0fef0.tar.gz
ls,ps,watch: measure terminal width on fd 0, not 1
Diffstat (limited to 'procps/ps.c')
-rw-r--r--procps/ps.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/procps/ps.c b/procps/ps.c
index 50b6a6c94..5150a08a2 100644
--- a/procps/ps.c
+++ b/procps/ps.c
@@ -322,7 +322,7 @@ int ps_main(int argc, char **argv)
* and such large widths */
terminal_width = MAX_WIDTH;
if (isatty(1)) {
- get_terminal_width_height(1, &terminal_width, NULL);
+ get_terminal_width_height(0, &terminal_width, NULL);
if (--terminal_width > MAX_WIDTH)
terminal_width = MAX_WIDTH;
}
@@ -364,7 +364,7 @@ int ps_main(int argc, char **argv)
if (w_count) {
terminal_width = (w_count==1) ? 132 : MAX_WIDTH;
} else {
- get_terminal_width_height(1, &terminal_width, NULL);
+ get_terminal_width_height(0, &terminal_width, NULL);
/* Go one less... */
if (--terminal_width > MAX_WIDTH)
terminal_width = MAX_WIDTH;