Re: ps output line length (was: svn commit: r314685 - head/bin/ps)

2018-01-29 Thread Garance A Drosehn
On 28 Jan 2018, at 11:22, Mike Karels wrote: > The rationale for the original code was that, for interactive uses, the > output line length should be the same for "ps ...", "ps ...|more", and > "ps ... |grep". The -w option exists to make the line longer; there is > no option to use the terminal

Re: ps output line length (was: svn commit: r314685 - head/bin/ps)

2018-01-29 Thread Eric van Gyzen
On 01/29/2018 12:08, John Baldwin wrote: > On Sunday, January 28, 2018 10:22:56 AM Mike Karels wrote: >> Recently, I was investigating an issue with top on -current while doing >> a "make buildworld", and ran "ps axu|more" for comparison. To my surprise, >> I got only a few very long lines of

Re: ps output line length (was: svn commit: r314685 - head/bin/ps)

2018-01-29 Thread John Baldwin
On Sunday, January 28, 2018 10:22:56 AM Mike Karels wrote: > Recently, I was investigating an issue with top on -current while doing > a "make buildworld", and ran "ps axu|more" for comparison. To my surprise, > I got only a few very long lines of output, containing full command lines > for

Re: ps output line length (was: svn commit: r314685 - head/bin/ps)

2018-01-28 Thread Warner Losh
On Jan 28, 2018 9:51 AM, "Mike Karels" wrote: Recently, I was investigating an issue with top on -current while doing a "make buildworld", and ran "ps axu|more" for comparison. To my surprise, I got only a few very long lines of output, containing full command lines for

ps output line length (was: svn commit: r314685 - head/bin/ps)

2018-01-28 Thread Mike Karels
Recently, I was investigating an issue with top on -current while doing a "make buildworld", and ran "ps axu|more" for comparison. To my surprise, I got only a few very long lines of output, containing full command lines for compiler runs. This quickly led me to the following commit, which I

Re: svn commit: r314685 - head/bin/ps

2017-03-06 Thread Bruce Evans
On Mon, 6 Mar 2017, Bryan Drewery wrote: On 3/6/17 8:11 PM, Bryan Drewery wrote: On 3/4/17 2:38 PM, Conrad Meyer wrote: Author: cem Date: Sat Mar 4 22:38:10 2017 New Revision: 314685 URL: https://svnweb.freebsd.org/changeset/base/314685 Log: ps(1): Only detect terminal width if stdout is

Re: svn commit: r314685 - head/bin/ps

2017-03-06 Thread Bryan Drewery
On 3/6/17 8:11 PM, Bryan Drewery wrote: > On 3/4/17 2:38 PM, Conrad Meyer wrote: >> Author: cem >> Date: Sat Mar 4 22:38:10 2017 >> New Revision: 314685 >> URL: https://svnweb.freebsd.org/changeset/base/314685 >> >> Log: >> ps(1): Only detect terminal width if stdout is a tty >> >> If

Re: svn commit: r314685 - head/bin/ps

2017-03-06 Thread Bryan Drewery
On 3/4/17 2:38 PM, Conrad Meyer wrote: > Author: cem > Date: Sat Mar 4 22:38:10 2017 > New Revision: 314685 > URL: https://svnweb.freebsd.org/changeset/base/314685 > > Log: > ps(1): Only detect terminal width if stdout is a tty > > If stdout isn't a tty, use unlimited width output rather

Re: svn commit: r314685 - head/bin/ps

2017-03-06 Thread Bruce Evans
On Sun, 5 Mar 2017, Ed Schouten wrote: 2017-03-05 0:08 GMT+01:00 Conrad Meyer : - If something is a TTY, then our implementation of the TTY layer guarantees that TIOCGWINSZ always works. Do you know if it did in 1990 too? It's hard to tell why Marc@ made this change way

Re: svn commit: r314685 - head/bin/ps

2017-03-05 Thread Ed Schouten
Hi Conrad, 2017-03-05 0:08 GMT+01:00 Conrad Meyer : >> - If something is a TTY, then our implementation of the TTY layer >> guarantees that TIOCGWINSZ always works. > > Do you know if it did in 1990 too? It's hard to tell why Marc@ made > this change way back then. I wasn't

Re: svn commit: r314685 - head/bin/ps

2017-03-04 Thread Bruce Evans
On Sat, 4 Mar 2017, Conrad Meyer wrote: On Sat, Mar 4, 2017 at 6:50 PM, Bruce Evans wrote: Author: cem Date: Sat Mar 4 22:38:10 2017 New Revision: 314685 URL: https://svnweb.freebsd.org/changeset/base/314685 Log: ps(1): Only detect terminal width if stdout is a tty

Re: svn commit: r314685 - head/bin/ps

2017-03-04 Thread Conrad Meyer
On Sat, Mar 4, 2017 at 6:50 PM, Bruce Evans wrote: >> Author: cem >> Date: Sat Mar 4 22:38:10 2017 >> New Revision: 314685 >> URL: https://svnweb.freebsd.org/changeset/base/314685 >> >> Log: >> ps(1): Only detect terminal width if stdout is a tty >> >> If stdout isn't a

Re: svn commit: r314685 - head/bin/ps

2017-03-04 Thread Bruce Evans
On Sat, 4 Mar 2017, Conrad Meyer wrote: Author: cem Date: Sat Mar 4 22:38:10 2017 New Revision: 314685 URL: https://svnweb.freebsd.org/changeset/base/314685 Log: ps(1): Only detect terminal width if stdout is a tty If stdout isn't a tty, use unlimited width output rather than truncating to

Re: svn commit: r314685 - head/bin/ps

2017-03-04 Thread Conrad Meyer
Hi Ed, On Sat, Mar 4, 2017 at 2:58 PM, Ed Schouten wrote: >> @@ -194,6 +194,8 @@ main(int argc, char *argv[]) >> >> if ((cols = getenv("COLUMNS")) != NULL && *cols != '\0') >> termwidth = atoi(cols); >> + else if (!isatty(STDOUT_FILENO)) >> +

Re: svn commit: r314685 - head/bin/ps

2017-03-04 Thread Ed Schouten
Hi Conrad, 2017-03-04 23:38 GMT+01:00 Conrad Meyer : > Log: > ps(1): Only detect terminal width if stdout is a tty Nice! > Modified: head/bin/ps/ps.c > == > --- head/bin/ps/ps.cSat Mar 4

svn commit: r314685 - head/bin/ps

2017-03-04 Thread Conrad Meyer
Author: cem Date: Sat Mar 4 22:38:10 2017 New Revision: 314685 URL: https://svnweb.freebsd.org/changeset/base/314685 Log: ps(1): Only detect terminal width if stdout is a tty If stdout isn't a tty, use unlimited width output rather than truncating to 79 characters. This is helpful for