diff options
author | Robert Nagy <robert@cvs.openbsd.org> | 2005-03-27 20:56:48 +0000 |
---|---|---|
committer | Robert Nagy <robert@cvs.openbsd.org> | 2005-03-27 20:56:48 +0000 |
commit | 55112adede2c969d79567bb0a7f28e60ff1a081d (patch) | |
tree | 5b55e68716a97b2b55afccd60b4fceb3e27114ff | |
parent | 443b3c84aa3e8893d74d84f17cc9bffcd9c52de1 (diff) |
revert r1.9; this one needs more discussion
-rw-r--r-- | usr.bin/pkill/pkill.1 | 8 | ||||
-rw-r--r-- | usr.bin/pkill/pkill.c | 16 |
2 files changed, 9 insertions, 15 deletions
diff --git a/usr.bin/pkill/pkill.1 b/usr.bin/pkill/pkill.1 index 042b1e11cc6..5bed9b60da4 100644 --- a/usr.bin/pkill/pkill.1 +++ b/usr.bin/pkill/pkill.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: pkill.1,v 1.4 2005/03/27 14:50:09 robert Exp $ +.\" $OpenBSD: pkill.1,v 1.5 2005/03/27 20:56:47 robert Exp $ .\" $NetBSD: pkill.1,v 1.8 2003/02/14 15:59:18 grant Exp $ .\" .\" Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -43,7 +43,7 @@ .Nd find or signal processes by name .Sh SYNOPSIS .Nm pgrep -.Op Fl filnvx +.Op Fl flnvx .Op Fl G Ar gid .Op Fl P Ar ppid .Op Fl U Ar uid @@ -55,7 +55,7 @@ .Op Ar pattern Op ... .Nm pkill .Op Fl signal -.Op Fl finvx +.Op Fl fnvx .Op Fl G Ar gid .Op Fl P Ar ppid .Op Fl U Ar uid @@ -108,8 +108,6 @@ The value zero is taken to mean the process group ID of the running or .Nm pkill command. -.It Fl i -Ignore case distinctions in both the process table and the supplied pattern. .It Fl l Long output. Print the process name in addition to the process ID for each matching diff --git a/usr.bin/pkill/pkill.c b/usr.bin/pkill/pkill.c index ac96a9ca5e2..c5374f1588f 100644 --- a/usr.bin/pkill/pkill.c +++ b/usr.bin/pkill/pkill.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pkill.c,v 1.10 2005/03/27 14:50:09 robert Exp $ */ +/* $OpenBSD: pkill.c,v 1.11 2005/03/27 20:56:47 robert Exp $ */ /* $NetBSD: pkill.c,v 1.5 2002/10/27 11:49:34 kleink Exp $ */ /*- @@ -38,7 +38,7 @@ */ #ifndef lint -static const char rcsid[] = "$OpenBSD: pkill.c,v 1.10 2005/03/27 14:50:09 robert Exp $"; +static const char rcsid[] = "$OpenBSD: pkill.c,v 1.11 2005/03/27 20:56:47 robert Exp $"; #endif /* !lint */ #include <sys/types.h> @@ -94,7 +94,6 @@ int inverse; int longfmt; int matchargs; int fullmatch; -int cflags = REG_EXTENDED; kvm_t *kd; pid_t mypid; @@ -159,7 +158,7 @@ main(int argc, char **argv) criteria = 0; - while ((ch = getopt(argc, argv, "G:P:U:d:fg:ilns:t:u:vx")) != -1) + while ((ch = getopt(argc, argv, "G:P:U:d:fg:lns:t:u:vx")) != -1) switch (ch) { case 'G': makelist(&rgidlist, LT_GROUP, optarg); @@ -185,9 +184,6 @@ main(int argc, char **argv) makelist(&pgrplist, LT_PGRP, optarg); criteria = 1; break; - case 'i': - cflags |= REG_ICASE; - break; case 'l': if (!pgrep) usage(); @@ -252,7 +248,7 @@ main(int argc, char **argv) * Refine the selection. */ for (; *argv != NULL; argv++) { - if ((rv = regcomp(®, *argv, cflags)) != 0) { + if ((rv = regcomp(®, *argv, REG_EXTENDED)) != 0) { regerror(rv, ®, buf, sizeof(buf)); errx(STATUS_BADUSAGE, "bad expression: %s", buf); } @@ -419,9 +415,9 @@ usage(void) const char *ustr; if (pgrep) - ustr = "[-filnvx] [-d delim]"; + ustr = "[-flnvx] [-d delim]"; else - ustr = "[-signal] [-finvx]"; + ustr = "[-signal] [-fnvx]"; fprintf(stderr, "usage: %s %s [-G gid] [-P ppid] [-U uid] [-g pgrp] " "[-s sid] [-t tty] [-u euid] pattern ...\n", __progname, ustr); |