Lines Matching refs:pid
199 def kill_process(self, pid):
200 """Attempts to kill the given pid.
201 Will fail silently if pid does not exist or insufficient permisssions."""
203 # We only use taskkill.exe on windows (not cygwin) because subprocess.pid
204 # is a CYGWIN pid and taskkill.exe expects a windows pid.
205 # Thankfully os.kill on CYGWIN handles either pid type.
206 command = ["taskkill.exe", "/f", "/pid", pid]
218 os.kill(pid, signal.SIGKILL)
222 _log.warn("Failed to kill pid %s. Too many EAGAIN errors." % pid)
225 _log.warn("Called kill_process with a non-existant pid %s" % pid)
229 def _win32_check_running_pid(self, pid):
257 if pe32.th32ProcessID == pid:
265 def check_running_pid(self, pid):
266 """Return True if pid is alive, otherwise return False."""
269 os.kill(pid, 0)
274 return self._win32_check_running_pid(pid)