bin/103320: PATCH Improvement to ps when stdout is not a tty

Evan Clarke evan at proc.to
Sun Sep 17 01:20:16 PDT 2006


>Number:         103320
>Category:       bin
>Synopsis:       PATCH Improvement to ps when stdout is not a tty
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Sep 17 08:20:12 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Evan Clarke
>Release:        FreeBSD 6.2-PRERELEASE i386
>Organization:
None
>Environment:
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
>Description:
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.
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list