From df758e98754016119a9c8d49213a636a80ffab22 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Thu, 28 Mar 2013 23:00:32 +0100 Subject: [PATCH] killall: print notice what we forcefully KILL --- src/core/killall.c | 7 +++++++ 1 file changed, 7 insertions(+) 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) -- 2.30.2