Date: Mon, 10 Aug 2009 16:15:21 -0400 From: Justin Hibbits <jrh29@alumni.cwru.edu> To: Doug Barton <dougb@freebsd.org> Cc: freebsd-current@freebsd.org, Ivan Radovanovic <rivanr@gmail.com> Subject: Re: Weird console bug Message-ID: <fd9cd3450908101315m7786feacl9e8f535d1ad44925@mail.gmail.com> In-Reply-To: <4A807D12.1000104@FreeBSD.org> References: <50679.1249933434@critter.freebsd.dk> <4A8079FF.1040007@gmail.com> <4A807D12.1000104@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Aug 10, 2009 at 4:03 PM, Doug Barton<dougb@freebsd.org> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?fd9cd3450908101315m7786feacl9e8f535d1ad44925>