kill: Fix argument handling for negative PIDs
This commit is contained in:
parent
5c55464aab
commit
79097e55e4
2
skill.c
2
skill.c
@ -507,7 +507,7 @@ static void __attribute__ ((__noreturn__))
|
|||||||
} else {
|
} else {
|
||||||
/* Special case for signal digit negative
|
/* Special case for signal digit negative
|
||||||
* PIDs */
|
* PIDs */
|
||||||
pid = atoi(argv[optind]);
|
pid = atoi(argv[optind-1]);
|
||||||
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…
x
Reference in New Issue
Block a user