MCPcopy Create free account
hub / github.com/FastLED/FastLED / _is_process_alive_psutil

Function _is_process_alive_psutil

ci/util/build_lock.py:45–58  ·  view source on GitHub ↗

Check if a process is alive using psutil (more reliable than kernel32 on Windows).

(pid: int)

Source from the content-addressed store, hash-verified

43
44
45def _is_process_alive_psutil(pid: int) -> bool:
46 """Check if a process is alive using psutil (more reliable than kernel32 on Windows)."""
47 try:
48 import psutil
49
50 return psutil.pid_exists(pid)
51 except KeyboardInterrupt as ki:
52 handle_keyboard_interrupt(ki)
53 raise
54 except Exception:
55 # Fallback to the existing kernel32/os.kill checker
56 from ci.util.file_lock_rw_util import is_process_alive
57
58 return is_process_alive(pid)
59
60
61def _get_process_info(pid: int) -> str:

Callers 1

_check_stale_lockMethod · 0.85

Calls 2

is_process_aliveFunction · 0.90

Tested by

no test coverage detected