X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fcore%2Fkillall.c;h=1eb3766f777a81d3dd566794df15541dd49d1bfe;hb=d51539b182c0a8869e2063e82d04f8a5849bfbab;hp=55200ffa4847e2eb8053c51201a451335c094603;hpb=f274ece0f76b5709408821e317e87aef76123db6;p=elogind.git diff --git a/src/core/killall.c b/src/core/killall.c index 55200ffa4..1eb3766f7 100644 --- a/src/core/killall.c +++ b/src/core/killall.c @@ -139,6 +139,13 @@ static int killall(int sig) { if (ignore_proc(pid)) continue; + if (sig == SIGKILL) { + _cleanup_free_ char *s; + + get_process_comm(pid, &s); + log_notice("Sending SIGKILL to PID %lu (%s)", (unsigned long) pid, strna(s)); + } + if (kill(pid, sig) >= 0) n_processes++; else if (errno != ENOENT)