]> granicus.if.org Git - procps-ng/commit
ps: favor truncation of long names over POSIX/UNIX standard
authorJim Warner <james.warner@comcast.net>
Mon, 17 Sep 2012 20:30:45 +0000 (15:30 -0500)
committerCraig Small <csmall@enc.com.au>
Thu, 27 Sep 2012 12:16:53 +0000 (22:16 +1000)
commita65de0fd7337116ef43e9e5597ea507e910f5c8b
treedca67b7faf2272839881f62d7a29263b352d6c1b
parentfaec340719de6db8f64c468cf1dec84ffdd914a3
ps: favor truncation of long names over POSIX/UNIX standard

The UNIX and POSIX standards require that user and
group names be printed as decimal integers when there
is insufficient room.  This has led to a constant
stream of bug reports.

With this commit, long names will be truncated and
displayed with a trailing visual clue.

To avoid truncation. the UNIX and POSIX way to change
column width is to rename the column:
   ps -o pid,user=CumbersomeUserNames -o comm

The easy way is to directly specify the desired width:
   ps -o pid,user:19,comm

Reference:
http://www.freelists.org/post/procps/rhbz737215-ps-does-not-resolve-some-user-names

Signed-off-by: Jim Warner <james.warner@comcast.net>
ps/output.c