fix parsing of negative PIDs
Signed-off-by: Craig Small <csmall@enc.com.au>
This commit is contained in:
parent
aa9bd38d0a
commit
b42997b6c9
2
skill.c
2
skill.c
@ -479,7 +479,7 @@ static void __attribute__ ((__noreturn__))
|
|||||||
} else {
|
} else {
|
||||||
/* Special case for signal digit negative
|
/* Special case for signal digit negative
|
||||||
* PIDs */
|
* PIDs */
|
||||||
pid = (long)('0' - optopt);
|
pid = atoi(argv[optind]);
|
||||||
if (kill((pid_t)pid, signo) != 0)
|
if (kill((pid_t)pid, signo) != 0)
|
||||||
exitvalue = EXIT_FAILURE;
|
exitvalue = EXIT_FAILURE;
|
||||||
exit(exitvalue);
|
exit(exitvalue);
|
||||||
|
Loading…
Reference in New Issue
Block a user