freebsd-skq/bin
Conrad Meyer 9c4241c3d7 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 shell scripts or e.g., 'ps | grep foo'.

This hardcoded width has some history: In The Beginning of History[0], the
width of ps was hardcoded as 80 bytes.  In 1985, Bloom@ added detection
using TIOCGWINSZ on stdin.[1]  In 1986, Kirk merged a change to check
stdout's window size instead.  In 1990, the fallback checks to stderr and
stdin's TIOCGWINSZ were added by Marc@, with the commit message "new
version."[2]

OS X Darwin has a very similar modification to ps(1), which simply sets
UNLIMITED for all non-tty outputs.[3]  I've chosen to respect COLUMNS
instead of behaving identically to Darwin here, but I don't feel strongly
about that.  We could match OS X for parity if that is desired.

[0]: https://svnweb.freebsd.org/csrg/bin/ps/ps.c?annotate=1065
[1]: https://svnweb.freebsd.org/csrg/bin/ps/ps.c?r1=18105&r2=18106
[2]:
https://svnweb.freebsd.org/csrg/bin/ps/ps.c?r1=40675&r2=40674&pathrev=40675
[3]:
https://opensource.apple.com/source/adv_cmds/adv_cmds-168/ps/ps.c.auto.html

PR:		217159
Reported by:	Deepak Nagaraj <n.deepak at gmail.com>
2017-03-04 22:38:10 +00:00
..
cat Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
chflags Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
chio Document where chio(1) originated from & which version of FreeBSD first included it. 2016-10-05 18:26:39 +00:00
chmod Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
cp Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
csh bin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:31:08 +00:00
date Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
dd Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
df bin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:31:08 +00:00
domainname Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
echo Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
ed Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
expr Document origins of expr & authors 2016-10-05 19:26:35 +00:00
freebsd-version bin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:31:08 +00:00
getfacl Explicitly add unmarked bin/ binaries to the runtime package. 2016-02-09 16:58:50 +00:00
hostname Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
kenv style(9). 2016-11-28 07:21:09 +00:00
kill Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
ln Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
ls Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
mkdir Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
mv Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
pax Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
pkill Increase timeouts so tests have more chances to succeed 2016-10-19 12:23:02 +00:00
ps ps(1): Only detect terminal width if stdout is a tty 2017-03-04 22:38:10 +00:00
pwait Explicitly add unmarked bin/ binaries to the runtime package. 2016-02-09 16:58:50 +00:00
pwd Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
rcp Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
realpath Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
rm Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
rmail bin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:31:08 +00:00
rmdir Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
setfacl Explicitly NUL terminate the buffer filled by fread(). 2016-06-08 05:32:39 +00:00
sh bin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:31:08 +00:00
sleep Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
stty Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
sync Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
test Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
tests Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed 2016-05-04 23:20:53 +00:00
uuidgen uuid_to_string(3) is allocating memory and can fail on that. 2016-08-03 18:04:08 +00:00
Makefile Start using the fact that SUBDIR.yes is added to SUBDIR 2015-10-05 21:41:55 +00:00
Makefile.inc Use src.opts.mk in preference to bsd.own.mk except where we need stuff 2014-05-06 04:22:01 +00:00