diff --git a/SOURCES/1111-unit-always-return-1-in-log_kill.patch b/SOURCES/1111-unit-always-return-1-in-log_kill.patch new file mode 100644 index 0000000..fd182c8 --- /dev/null +++ b/SOURCES/1111-unit-always-return-1-in-log_kill.patch @@ -0,0 +1,30 @@ +From af95abec0f8abe5dbb53c2d47eba06c0e9473565 Mon Sep 17 00:00:00 2001 +From: msizanoen1 +Date: Tue, 7 Feb 2023 20:17:21 +0700 +Subject: [PATCH] unit: always return 1 in log_kill + +This ensures that cg_kill_items returns the correct value to let the +manager know that a process was killed. + +(cherry picked from commit 500cd2e83b8246fbf20d99db898039cfba746223) + +Resolves: RHEL-86239 +--- + src/core/unit.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/core/unit.c b/src/core/unit.c +index 03eb3aaecf..d98ecf4367 100644 +--- a/src/core/unit.c ++++ b/src/core/unit.c +@@ -4542,7 +4542,9 @@ static int log_kill(pid_t pid, int sig, void *userdata) { + /* Don't log about processes marked with brackets, under the assumption that these are temporary processes + only, like for example systemd's own PAM stub process. */ + if (comm && comm[0] == '(') +- return 0; ++ /* Although we didn't log anything, as this callback is used in unit_kill_context we must return 1 ++ * here to let the manager know that a process was killed. */ ++ return 1; + + log_unit_notice(userdata, + "Killing process " PID_FMT " (%s) with signal SIG%s.", diff --git a/SPECS/systemd.spec b/SPECS/systemd.spec index 062b375..b846e35 100644 --- a/SPECS/systemd.spec +++ b/SPECS/systemd.spec @@ -21,7 +21,7 @@ Name: systemd Url: https://systemd.io Version: 252 -Release: 51%{?dist}.alma.1 +Release: 51%{?dist}.1.alma.1 # For a breakdown of the licensing, see README License: LGPLv2+ and MIT and GPLv2+ Summary: System and Service Manager @@ -1193,6 +1193,7 @@ Patch1107: 1107-core-Handle-cgroup-pruning-in-on_cgroup_empty_event.patch Patch1108: 1108-Fix-failing-test.patch Patch1109: 1109-unit-don-t-gc-unit-in-oom-queue.patch Patch1110: 1110-core-do-not-GC-units-jobs-that-are-in-the-D-Bus-queu.patch +Patch1111: 1111-unit-always-return-1-in-log_kill.patch # AlmaLinux Patch Patch9000: 9000-core-reorder-systemd-arguments-on-reexec.patch @@ -2073,10 +2074,13 @@ systemd-hwdb update &>/dev/null || : %{_prefix}/lib/dracut/modules.d/70rhel-net-naming-sysattrs/* %changelog -* Tue May 13 2025 Andrew Lukoshko - 252-51.alma.1 +* Tue Jun 24 2025 Andrew Lukoshko - 252-51.1.alma.1 - core: reorder systemd arguments on reexe - Debrand for AlmaLinux +* Tue Apr 08 2025 systemd maintenance team - 252-51.1 +- unit: always return 1 in log_kill (RHEL-86239) + * Tue Jan 28 2025 systemd maintenance team - 252-51 - ci: use ubuntu 22:04 for deploy of man pages (RHEL-70884) - man/tmpfiles: fix off-by-one in example (RHEL-74015)