]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[3954] Replaced kill -0 with ps -p in keactrl
authorThomas Markwalder <tmark@isc.org>
Thu, 16 Jul 2015 18:05:01 +0000 (14:05 -0400)
committerThomas Markwalder <tmark@isc.org>
Thu, 16 Jul 2015 18:05:01 +0000 (14:05 -0400)
src/bin/keactrl/keactrl.in

index 4a469d029c0ec86bad7c1f2324bcad54fa0070be..129a7e74e21a8c392df2294fb624e9b9afc37263 100644 (file)
@@ -111,8 +111,8 @@ check_running() {
     # Get the PID from the PID file (if it exists)
     get_pid_from_file ${proc_name}
     if [ ${_pid} -gt 0 ]; then
-        # Use kill -0 to check if PID is alive
-        kill -0 ${_pid}
+        # Use ps to check if PID is alive
+        ps -p ${_pid} 1>/dev/null
         if [ $? -eq 0 ]; then
             # No error, so PID IS ALIVE
             _running=1