From nobody@FreeBSD.org  Sun Sep 17 08:12:50 2006
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 7AE3A16A591
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 17 Sep 2006 08:12:50 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id BF76343D5F
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 17 Sep 2006 08:12:45 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k8H8Cf74019320
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 17 Sep 2006 08:12:41 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id k8H8Cfua019319;
	Sun, 17 Sep 2006 08:12:41 GMT
	(envelope-from nobody)
Message-Id: <200609170812.k8H8Cfua019319@www.freebsd.org>
Date: Sun, 17 Sep 2006 08:12:41 GMT
From: Evan Clarke <evan@proc.to>
To: freebsd-gnats-submit@FreeBSD.org
Subject: PATCH Improvement to ps when stdout is not a tty
X-Send-Pr-Version: www-2.3

>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:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Sep 17 08:20:12 GMT 2006
>Closed-Date:    Mon Sep 18 10:33:28 GMT 2006
>Last-Modified:  Mon Sep 18 10:33:28 GMT 2006
>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@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:
State-Changed-From-To: open->closed 
State-Changed-By: maxim 
State-Changed-When: Mon Sep 18 10:31:58 UTC 2006 
State-Changed-Why:  
Duplicate of bin/90690.  Please read an audit trail of this PR and 
submit your patches there.  Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/90690 

http://www.freebsd.org/cgi/query-pr.cgi?pr=103320 
>Unformatted:
