[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bin/45681: [dM] ps -k doesn't take "command"
>Synopsis: [dM] ps's -k option doesn't accept "command" or "comm"
>Arrival-Date: Sun Dec 04 06:45:00 +0000 2011
>Release: NetBSD 5.1 or 4.0.1
Any; noticed on
System: NetBSD Chip.Rodents-Montreal.ORG 4.0.1 NetBSD 4.0.1 (NETSERVER) #0: Tue
Nov 8 17:03:12 EST 2011
Verified present on
System: NetBSD MVN-Home.Rodents-Montreal.ORG 5.1 NetBSD 5.1 (MVN) #2: Sun Dec 4
00:31:50 EST 2011
ps -k allows sorting on many fields, but for some inexplicable
(inexplicable from a user's point of view, that is) reason
refuses to sort on "command" or "comm". (Incidentally, this
restriction isn't documented.)
% ps -k command
% ps -k comm
Note the message and the lack of sorting.
I'm not entirely sure. It looks to me as though command
strings (sometimes?) aren't fetched until they're about to be
printed (in command() in print.c); perhaps they need to be
fetched at the same time as the rest of the data, so they can
be sorted on? Perhaps a FETCHMODE needs to be added, sibling
to PRINTMODE and WIDTHMODE? Adding a STRING type is easy
enough, but without data to operate on, there's no point.
/~\ The ASCII Mouse
\ / Ribbon Campaign
X Against HTML mouse%rodents-montreal.org@localhost
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B
Main Index |
Thread Index |