From: Benedikt Böhm Date: Tue, 12 Apr 2016 19:02:28 +0000 (+0200) Subject: fix parsing of negative PIDs X-Git-Tag: v3.3.12~47 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b42997b6c9c140c0ee1b93c4bbbc0fee38d21238;p=procps-ng fix parsing of negative PIDs Signed-off-by: Craig Small --- diff --git a/skill.c b/skill.c index f8f4e499..91475275 100644 --- a/skill.c +++ b/skill.c @@ -479,7 +479,7 @@ static void __attribute__ ((__noreturn__)) } else { /* Special case for signal digit negative * PIDs */ - pid = (long)('0' - optopt); + pid = atoi(argv[optind]); if (kill((pid_t)pid, signo) != 0) exitvalue = EXIT_FAILURE; exit(exitvalue);