Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Dec 2005 21:47:40 +0600 (NOVT)
From:      "Vadim S. Goncharov" <vadim_nuclight@mail.ru>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   bin/90690: ps(1) errorneously respects terminal column settings when output is not to a terminal
Message-ID:  <200512201547.jBKFlelY061039@hostel.avtf.net>
Resent-Message-ID: <200512201550.jBKFo3wS015617@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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@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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200512201547.jBKFlelY061039>