fix parsing of negative PIDs

Signed-off-by: Craig Small <csmall@enc.com.au>
This commit is contained in:
Benedikt Böhm 2016-04-12 21:02:28 +02:00 committed by Craig Small
parent aa9bd38d0a
commit b42997b6c9

View File

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