void-packages/srcpkgs/procps/patches/skill_null_argv.patch

15 lines
501 B
Diff

Author: WANG Yunfeng <uhuruh@gmail.com>
Description: Don't treat skill null parameter as 0
Bug-Debian: http://bugs.debian.org/551173
--- a/skill.c
+++ b/skill.c
@@ -307,7 +307,7 @@
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