skill: do not treat skill null parameter as 0

A patch from Debian.

Bug-Debian: http://bugs.debian.org/551173
Backported-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
WANG Yunfeng 2009-10-16 18:39:31 +08:00 committed by Craig Small
parent 057f895529
commit 15b853c02b

View File

@ -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