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 <[email protected]>
---
 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.2


Reply via email to