bin/90690: ps(1) errorneously respects terminal column settings when output is not to a terminal

Vadim S. Goncharov vadim_nuclight at mail.ru
Tue Dec 20 07:50:12 PST 2005


>Number:         90690
>Category:       bin
>Synopsis:       ps(1) errorneously respects terminal column settings when output is not to a terminal
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Dec 20 15:50:02 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Vadim S. Goncharov
>Release:        FreeBSD 4.11-STABLE i386
>Organization:
TPU AVTF Hostel
>Environment:
System: FreeBSD hostel.avtf.net 4.11-STABLE FreeBSD 4.11-STABLE #0: Tue Nov 22 00:07:38 NOVT 2005 vadim at hostel.avtf.net:/usr/obj/usr/src/sys/HOSTEL i386

>Description:
	Opposite to other bin utilities such as ls(1), ps(1) always respects terminal settings even if it's stdout is not a terminal (pipe, file). You should manually specify terminal settings ignorance to ps, but this behavior is counter-intuitive.
>How-To-Repeat:
	resize xterm window to small number of columns (i.e, 10) and try to do:
	ps aux | grep something
	you'll won't get anything matched even if you'll get it matched on a wider terminal
>Fix:
	Workaround is to add "ww" to ps cmd line args in every ps call pipelined or file redirected.
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list