MCPcopy Index your code
hub / github.com/AstrBotDevs/AstrBot / _stop_process

Function _stop_process

scripts/smoke_startup_check.py:40–49  ·  view source on GitHub ↗
(proc: subprocess.Popen[bytes])

Source from the content-addressed store, hash-verified

38
39
40def _stop_process(proc: subprocess.Popen[bytes]) -> None:
41 if proc.poll() is not None:
42 return
43
44 proc.terminate()
45 try:
46 proc.wait(timeout=10)
47 except subprocess.TimeoutExpired:
48 proc.kill()
49 proc.wait(timeout=10)
50
51
52def main() -> int:

Callers 1

mainFunction · 0.85

Calls 3

killMethod · 0.80
terminateMethod · 0.45
waitMethod · 0.45

Tested by

no test coverage detected