kill: report error if cannot kill process
Shell kill would report a problem if you tried to kill a process while procps kill was silent. This meant it looked like kill worked when it actually failed. References: https://bugs.debian.org/733172
This commit is contained in:
parent
ee1fd80fc0
commit
07642b8ea6
1
NEWS
1
NEWS
@ -5,6 +5,7 @@ procps-ng-NEXT
|
|||||||
* ps: Fallback to attr/current for context Debian #786956
|
* ps: Fallback to attr/current for context Debian #786956
|
||||||
* tests: Conditionally add prctl Debian #816237
|
* tests: Conditionally add prctl Debian #816237
|
||||||
* pidof: check cmd if space in argv0. GitLab #4
|
* pidof: check cmd if space in argv0. GitLab #4
|
||||||
|
* kill: report error if cannot kill process #733172
|
||||||
|
|
||||||
procps-ng-3.3.11
|
procps-ng-3.3.11
|
||||||
----------------
|
----------------
|
||||||
|
1
skill.c
1
skill.c
@ -500,6 +500,7 @@ static void __attribute__ ((__noreturn__))
|
|||||||
pid = strtol_or_err(argv[i], _("failed to parse argument"));
|
pid = strtol_or_err(argv[i], _("failed to parse argument"));
|
||||||
if (!kill((pid_t) pid, signo))
|
if (!kill((pid_t) pid, signo))
|
||||||
continue;
|
continue;
|
||||||
|
error(0, errno, "(%d)", pid);
|
||||||
exitvalue = EXIT_FAILURE;
|
exitvalue = EXIT_FAILURE;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user