kill: Fix argument handling for negative PIDs

This commit is contained in:
Raphaël Jakse 2018-09-07 12:57:03 +00:00 committed by Craig Small
parent 5c55464aab
commit 79097e55e4

View File

@ -507,7 +507,7 @@ static void __attribute__ ((__noreturn__))
} else {
/* Special case for signal digit negative
* PIDs */
pid = atoi(argv[optind]);
pid = atoi(argv[optind-1]);
if (kill((pid_t)pid, signo) != 0)
exitvalue = EXIT_FAILURE;
exit(exitvalue);