fa.openbsd.tech
[Top] [All Lists]

Re: [patch] ps.c ps.1 Disregard terminal width when STDOUT is not a tty

Subject: Re: [patch] ps.c ps.1 Disregard terminal width when STDOUT is not a tty (take 2)
From: "Evan Clarke" <evan@xxxxxxx>
Date: Mon, 21 Jul 2008 02:25:58 UTC
Newsgroups: fa.openbsd.tech

On 21/07/2008, Theo de Raadt <deraadt@xxxxxxxxxxxxxxx> wrote:
> I don't particularily like this.  I think you should use the option "ww".
>
>     -w      Use 132 columns to display information, instead of the default,
>             which is the window size.  If the -w option is specified more
>             than once, ps will use as many columns as necessary without re-
>             gard for window size.
>
> As in, this is already a solved problem.

You do raise a valid point.  My main reason for the patch is that I
have a couple of scripts that I don't control, that assume the ww on
STDOUT!=tty, and break if it isn't present - I am assuming because the
GNU tools (and maybe others) do this.

This patch stops scripts behaviour from being dependant on the
terminal size - it adds a certain level of certainty on the output, in
a similar way to how ls changes behaviour of its output if it is
piping.


<Prev in Thread] Current Thread [Next in Thread>