From: Craig Small Date: Sat, 2 Jul 2016 04:49:51 +0000 (+1000) Subject: kill: report error if cannot kill process X-Git-Tag: v4.0.0~851 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5e9c522eeade3a2cb1f5679db84d8164b405860d;p=procps-ng 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: commit 07642b8ea6d4d61518808de2e5e7f713a2f36618 https://bugs.debian.org/733172 --- diff --git a/NEWS b/NEWS index d04b42e1..ef62e0f2 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,7 @@ procps-ng-NEXT * ps: Fallback to attr/current for context Debian #786956 * tests: Conditionally add prctl Debian #816237 * pidof: check cmd if space in argv0. GitLab #4 + * kill: report error if cannot kill process #733172 procps-ng-3.3.11 ---------------- diff --git a/kill.c b/kill.c index 315422b8..39386df2 100644 --- a/kill.c +++ b/kill.c @@ -132,6 +132,7 @@ int main(int argc, char **argv) pid = strtol_or_err(argv[i], _("failed to parse argument")); if (!kill((pid_t) pid, signo)) continue; + error(0, errno, "(%d)", pid); exitvalue = EXIT_FAILURE; continue; }