From a5d9c40262c2f5f917d5f27c5f052bdbe7066ac1 Mon Sep 17 00:00:00 2001 From: Alfredo Esteban Date: Mon, 11 Jun 2012 22:30:01 +1000 Subject: [PATCH] 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 --- NEWS | 1 + pgrep.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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);