MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / reap

Function reap

tests/test_coverage_flush.py:81–98  ·  view source on GitHub ↗
(proc)

Source from the content-addressed store, hash-verified

79
80
81def reap(proc):
82 if proc.poll() is not None:
83 return None
84 try:
85 proc.terminate()
86 except OSError:
87 pass
88 try:
89 proc.wait(timeout=REAP_SECONDS)
90 return None
91 except subprocess.TimeoutExpired:
92 pass
93 try:
94 proc.kill()
95 proc.wait(timeout=REAP_SECONDS)
96 return None
97 except (OSError, subprocess.TimeoutExpired):
98 return "owned child did not terminate after kill"
99
100
101def run_process(directory, label, argv, environment):

Callers 1

run_processFunction · 0.70

Calls 2

waitMethod · 0.80
pollMethod · 0.45

Tested by

no test coverage detected