NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bin/45681: [dM] ps -k doesn't take "command"
>Number: 45681
>Category: bin
>Synopsis: [dM] ps's -k option doesn't accept "command" or "comm"
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Sun Dec 04 06:45:00 +0000 2011
>Originator: Mouse
>Release: NetBSD 5.1 or 4.0.1
>Organization:
Dis-
>Environment:
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
mouse%Chip.Rodents-Montreal.ORG@localhost:/home/mouse/kbuild/NETSERVER i386
Architecture: i386
Machine: i386
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
mouse%MVN-Home.Rodents-Montreal.ORG@localhost:/home/mouse/kbuild/MVN i386
Architecture: i386
Machine: i386
>Description:
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.)
>How-To-Repeat:
% ps -k command
% ps -k comm
Note the message and the lack of sorting.
>Fix:
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
Home |
Main Index |
Thread Index |
Old Index