MCPcopy Index your code
hub / github.com/archlinux/archinstall / _pid_exists

Function _pid_exists

archinstall/lib/command.py:355–359  ·  view source on GitHub ↗
(pid: int)

Source from the content-addressed store, hash-verified

353
354
355def _pid_exists(pid: int) -> bool:
356 try:
357 return any(subprocess.check_output(['ps', '--no-headers', '-o', 'pid', '-p', str(pid)]).strip())
358 except subprocess.CalledProcessError:
359 return False
360
361
362def _cmd_history(cmd: list[str]) -> None:

Callers 1

pollMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected