MCPcopy Create free account
hub / github.com/fabioz/PyDev.Debugger / is_pid_alive

Function is_pid_alive

tests_python/test_debugger_json.py:5622–5632  ·  view source on GitHub ↗
(pid)

Source from the content-addressed store, hash-verified

5620 if check_subprocesses in ("kill_subprocesses", "dont_kill_subprocesses", "kill_subprocesses_ignore_pid"):
5621
5622 def is_pid_alive(pid):
5623 # Note: the process may be a zombie process in Linux
5624 # (althought it's killed it remains in that state
5625 # because we're monitoring it).
5626 try:
5627 proc = psutil.Process(pid)
5628 if proc.status() == psutil.STATUS_ZOMBIE:
5629 return False
5630 except psutil.NoSuchProcess:
5631 return False
5632 return True
5633
5634 def get_live_pids():
5635 return [pid for pid in process_ids_to_check if is_pid_alive(pid)]

Callers 1

get_live_pidsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected