From 15b853c02b5a16c29c39dc2632ee4f82a683c14c Mon Sep 17 00:00:00 2001 From: WANG Yunfeng Date: Fri, 16 Oct 2009 18:39:31 +0800 Subject: [PATCH] skill: do not treat skill null parameter as 0 A patch from Debian. Bug-Debian: http://bugs.debian.org/551173 Backported-by: Sami Kerola --- skill.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/skill.c b/skill.c index 66f042e2..3a1d3167 100644 --- a/skill.c +++ b/skill.c @@ -306,7 +306,7 @@ no_more_args: long pid; char *endp; pid = strtol(argv[argc],&endp,10); - if(!*endp){ + if(!*endp && (endp != argv[argc])){ if(!kill((pid_t)pid,signo)) continue; // The UNIX standard contradicts itself. If at least one process // is matched for each PID (as if processes could share PID!) and