diff --git a/lib/utils.py b/lib/utils.py
index 4c55dc9cf3b361a325c03e799e238fc516e15aab..47fe4cc22caf64879b9d7db60f432670ac99343f 100644
--- a/lib/utils.py
+++ b/lib/utils.py
@@ -1415,7 +1415,7 @@ def KillProcess(pid, signal_=signal.SIGTERM, timeout=30,
   while time.time() < end and IsProcessAlive(pid):
     time.sleep(0.1)
   if IsProcessAlive(pid):
-    _helper(pid, signal.SIGKILL, wait)
+    _helper(pid, signal.SIGKILL, waitpid)
 
 
 def FindFile(name, search_path, test=os.path.exists):