bin/103320: PATCH Improvement to ps when stdout is not a tty
evan at proc.to
Sun Sep 17 01:20:16 PDT 2006
>Synopsis: PATCH Improvement to ps when stdout is not a tty
>Arrival-Date: Sun Sep 17 08:20:12 GMT 2006
>Originator: Evan Clarke
>Release: FreeBSD 6.2-PRERELEASE i386
FreeBSD localhost.my.domain 6.2-PRERELEASE FreeBSD 6.2-PRERELEASE #1: Fri Sep 15 20:28:17 EST 2006 root at localhost.localdomain:/usr/obj/usr/src/sys/JUMPMAN i386
When the ps output is very wide, it gets truncated when outputting to a tty. That is fair and correct.
However, when piping to another process such as grep or less, the truncation still occurs and can lead to problems, especially when grepping for a specific items on a very wide output.
This patch will set the termwidth to UNLIMITED when stdout is not a tty. This is equilivant to adding ww to the command line.
It should be very low impact, ps w and ps ww (as well as ps outputting to a tty) still behave as expected.
Patch to follow in email - using web interface.
More information about the freebsd-bugs