From 450196c119e22268c9176cb7887cceb22bf8e9ff Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Wed, 28 Mar 2007 21:57:12 +0000 Subject: ps: work around libc bug: printf("%.*s\n", MAX_INT, buffer) --- procps/ps.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'procps') diff --git a/procps/ps.c b/procps/ps.c index c1cb64397..2be0b3605 100644 --- a/procps/ps.c +++ b/procps/ps.c @@ -262,7 +262,9 @@ int ps_main(int argc, char **argv) parse_o(default_o); post_process(); - terminal_width = INT_MAX; + /* Was INT_MAX, but some libc's go belly up with printf("%.*s") + * and such large widths */ + terminal_width = 30000; if (isatty(1)) { get_terminal_width_height(1, &terminal_width, NULL); terminal_width--; -- cgit v1.2.3