From owner-freebsd-current@FreeBSD.ORG Mon Aug 10 20:15:24 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 53C10106566C for ; Mon, 10 Aug 2009 20:15:24 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-yx0-f181.google.com (mail-yx0-f181.google.com [209.85.210.181]) by mx1.freebsd.org (Postfix) with ESMTP id EBB1F8FC23 for ; Mon, 10 Aug 2009 20:15:23 +0000 (UTC) Received: by yxe11 with SMTP id 11so4414547yxe.3 for ; Mon, 10 Aug 2009 13:15:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=UDmb2Jz2YXHTjNmPgeRFrp6GKUYxFiyfPQKxxlMwgLg=; b=AezFsHpTLGW744yH3aLwuGWjw3F7yCCEH/9Mkhyo1r3SdYuLllopzpDOCQZsntl1Lg Agl3RStFFM1XAfO+NN9sn9ovzA+1YgM2qKFEGlyED3HJtQ5mhIwvjt+VZoggI0b0c1I4 S7MC89D651E4UAQ8jJKIeFl2r1HHXqPsXv+g8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=d7TazbYciHBCMbm7RcKpY+gvsynQSUrTymhLCpjJ0cqysJ/AbwzE+XJLX/Sv5XaXvt 6R1EYw0Hd1kpQz4GnQGQWmAPN8tu3eP2brTrh+Zm+SOojBpcYlH3g3yM3+51NpimKkMl LC7XQbrTFXK9LN2zRGbDFWzcAOq2QQtl3QxTc= MIME-Version: 1.0 Sender: chmeeedalf@gmail.com Received: by 10.100.225.12 with SMTP id x12mr4142382ang.142.1249935322778; Mon, 10 Aug 2009 13:15:22 -0700 (PDT) In-Reply-To: <4A807D12.1000104@FreeBSD.org> References: <50679.1249933434@critter.freebsd.dk> <4A8079FF.1040007@gmail.com> <4A807D12.1000104@FreeBSD.org> Date: Mon, 10 Aug 2009 16:15:21 -0400 X-Google-Sender-Auth: f4cfc4a1e86e51f9 Message-ID: From: Justin Hibbits To: Doug Barton Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-current@freebsd.org, Ivan Radovanovic Subject: Re: Weird console bug X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Aug 2009 20:15:24 -0000 On Mon, Aug 10, 2009 at 4:03 PM, Doug Barton wrote: > Ivan Radovanovic wrote: >> Poul-Henning Kamp wrote: >>> In message <4A80778B.8090708@gmail.com>, Ivan Radovanovic writes: >>> >>> >>>> ps -axj | grep opera >>>> You will receive different results depending on width on console >>>> window (for example, for me no results on normal text mode console, >>>> in X it depends on width of console you are executing above command in= ). >>>> >>> >>> See the -w option to ps >>> >>> >> >> Thanks, anyway I find this behavior weird when redirecting or piping... > > And how does ps know when it's being redirected or piped? > > > Doug > > -- > > =A0 =A0This .signature sanitized for your protection > > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org= " > ps could be modified to use isatty(3) to determine if stdout is a tty. Currently if any of the tty ioctls return -1 it assumes a failsafe of 79 column width. This may not be necessary, though, since from the man page, specifying '-w' multiple times will make it use as many columns as necessary. Perhaps this could be the default if not a tty. - Justin