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: Hannah Schroeter <hannah@xxxxxxxxxx>
Date: Mon, 21 Jul 2008 12:34:57 UTC
Newsgroups: fa.openbsd.tech

Hi!

On Mon, Jul 21, 2008 at 12:18:04PM +1000, Evan Clarke wrote:
>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.

I wouldn't like your patch.

No way to tell ps to create terminal width output for ps ... | grep
pipes any more.

Kind regards,

Hannah.


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