From 8aa06d9fc3f7024611b00f00ca02ce14392d1e33 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Tue, 29 Jul 2025 14:36:54 +0000 Subject: [PATCH] initscripts: Fix process check for processes with PID file This check tests whether a process is still alive, but it fails for those processes when we are using a PID file. Signed-off-by: Michael Tremer --- src/initscripts/system/functions | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/initscripts/system/functions b/src/initscripts/system/functions index 85eb3e975..c4b7cb39e 100644 --- a/src/initscripts/system/functions +++ b/src/initscripts/system/functions @@ -620,7 +620,11 @@ killproc() done if [ -z "${killsig}" ]; then - pidofproc -s "${1}" + if [ -z "${pidfile}" ]; then + pidofproc -s "${1}" + else + pidofproc -s -p "${pidfile}" "${1}" + fi # Program was terminated if [ "$?" != "0" ]; then -- 2.47.3