Escalate to a SIGKILL in DroneUtility.kill_process() if the SIGTERM
didn't work

Signed-off-by: James Ren <jamesren@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3825 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/scheduler/drone_utility.py b/scheduler/drone_utility.py
index 1fdecc3..3ec4c97 100755
--- a/scheduler/drone_utility.py
+++ b/scheduler/drone_utility.py
@@ -154,16 +154,9 @@
         return results
 
 
-    def _is_process_running(self, process):
-        # TODO: enhance this to check the process args
-        proc_path = os.path.join('/proc', str(process.pid))
-        return os.path.exists(proc_path)
-
-
     def kill_process(self, process):
-        if self._is_process_running(process):
-            os.kill(process.pid, signal.SIGCONT)
-            os.kill(process.pid, signal.SIGTERM)
+        signal_queue = (signal.SIGCONT, signal.SIGTERM, signal.SIGKILL)
+        utils.nuke_pid(process.pid, signal_queue=signal_queue)
 
 
     def _convert_old_host_log(self, log_path):