NetBSD Problem Report #45681

From mouse@Sparkle.Rodents-Montreal.ORG  Sun Dec  4 06:42:00 2011
Return-Path: <mouse@Sparkle.Rodents-Montreal.ORG>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 0F65663D925
	for <gnats-bugs@gnats.NetBSD.org>; Sun,  4 Dec 2011 06:42:00 +0000 (UTC)
Message-Id: <201112040641.BAA24545@Sparkle.Rodents-Montreal.ORG>
Date: Sun, 4 Dec 2011 01:41:42 -0500 (EST)
From: Mouse <mouse@Rodents-Montreal.ORG>
Reply-To: mouse@Rodents-Montreal.ORG
To: gnats-bugs@gnats.NetBSD.org
Subject: [dM] ps -k doesn't take "command"
X-Send-Pr-Version: 3.95

>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:/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:/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
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.