Subject: bin/18837: pkill/pgrep -u euid doesn't work
To: None <gnats-bugs@gnats.netbsd.org>
From: None <Thilo.Manske@HEH.Uni-Oldenburg.DE>
List: netbsd-bugs
Date: 10/28/2002 10:47:20
>Number:         18837
>Category:       bin
>Synopsis:       pkill/pgrep -u euid-list doesn't work
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Oct 28 01:48:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Thilo Manske
>Release:        NetBSD 1.6 and later (current)
>Organization:
>Environment:
System: NetBSD WintelKiller 1.6J NetBSD 1.6J (WintelKiller) #360: Sun Oct 27 18:05:25 MET 2002 thilo@WintelKiller:/usr/src/sys/arch/i386/compile/WintelKiller i386
Architecture: i386
Machine: i386
>Description:
The documented option -u <euid> is not accepted by pkill/pgrep.
>How-To-Repeat:
% pgrep -u root
pgrep: unknown option -- u
usage: pgrep [-flnvx] [-d delim] [-G gid] [-P ppid] [-U uid] [-g pgrp] [-s sid] [-t tty] [-u euid] pattern ...
>Fix:
That was easy ;) :

Index: pkill.c
===================================================================
RCS file: /cvsroot/basesrc/usr.bin/pkill/pkill.c,v
retrieving revision 1.4
diff -c -r1.4 pkill.c
*** pkill.c	2002/03/06 12:02:18	1.4
--- pkill.c	2002/10/28 09:40:27
***************
*** 156,162 ****
  
  	criteria = 0;
  
! 	while ((ch = getopt(argc, argv, "G:P:U:d:fg:lns:t:vx")) != -1)
  		switch (ch) {
  		case 'G':
  			makelist(&rgidlist, LT_GROUP, optarg);
--- 156,162 ----
  
  	criteria = 0;
  
! 	while ((ch = getopt(argc, argv, "G:P:U:d:fg:lns:t:u:vx")) != -1)
  		switch (ch) {
  		case 'G':
  			makelist(&rgidlist, LT_GROUP, optarg);
>Release-Note:
>Audit-Trail:
>Unformatted: