MCPcopy Create free account
hub / github.com/Tele-AI/Fluxon / _terminate_process

Function _terminate_process

deployment/tests/test_selection_supervisor_codegen.py:190–203  ·  view source on GitHub ↗
(proc: Optional[subprocess.Popen[str]])

Source from the content-addressed store, hash-verified

188
189
190def _terminate_process(proc: Optional[subprocess.Popen[str]]) -> None:
191 if proc is None:
192 return
193 if proc.poll() is None:
194 proc.terminate()
195 try:
196 proc.wait(timeout=10)
197 except subprocess.TimeoutExpired:
198 proc.kill()
199 proc.wait(timeout=10)
200 if proc.stdout is not None:
201 proc.stdout.read()
202 if proc.stderr is not None:
203 proc.stderr.read()
204
205
206def _observe_status(module, label: str) -> dict:

Calls 3

pollMethod · 0.45
waitMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected