cgroup: optionally check number of tasks before cgroup.kill

This of course cannot be atomic, but for informational purposes it
should be good enough
This commit is contained in:
Luca Boccassi
2026-05-28 20:55:01 +01:00
parent 39bec38eb1
commit 92a5bf2c02
3 changed files with 16 additions and 3 deletions
+1 -1
View File
@@ -4158,7 +4158,7 @@ int unit_kill(
}
if (signo == SIGKILL) {
r = cg_kill_kernel_sigkill(p);
r = cg_kill_kernel_sigkill(p, /* ret_n_pids_killed= */ NULL);
if (r >= 0) {
killed = true;
log_unit_info(u, "Killed unit cgroup '%s' with SIGKILL on client request.", p);