From: Alfredo Esteban Date: Mon, 11 Jun 2012 12:30:01 +0000 (+1000) Subject: pkill -u uid fix X-Git-Tag: v3.3.4~63 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a5d9c40262c2f5f917d5f27c5f052bdbe7066ac1;p=procps-ng pkill -u uid fix pkill would not parse -u options correctly and needed no space between the flag and uid. Bug-Debian: http://bugs.debian.org/676239 Signed-Of-By: Craig Small --- diff --git a/NEWS b/NEWS index bdaa3f14..3cdb8952 100644 --- a/NEWS +++ b/NEWS @@ -4,6 +4,7 @@ procps-ng-3.3.4 * w get -i option to display IP addresses * watch 8bit fixes Debian #675069 * Fixed FTBFS for non-linux Debian #677055 + * pkill -u doesnt need space Debian #676239 procps-ng-3.3.3 --------------- diff --git a/pgrep.c b/pgrep.c index fed70b98..5b39c0c8 100644 --- a/pgrep.c +++ b/pgrep.c @@ -564,7 +564,7 @@ int signal_option(int *argc, char **argv) { int sig; int i = 1; - while (i < *argc) { + if (argc > 2 && argv[1][0] == '-') { sig = signal_name_to_number(argv[i] + 1); if (sig == -1 && isdigit(argv[1][1])) sig = atoi(argv[1] + 1);