MCPcopy Index your code
hub / github.com/python/cpython / cleanup_process

Function cleanup_process

Tools/inspection/benchmark_external_inspection.py:395–404  ·  view source on GitHub ↗

Clean up the target process and temporary file

(process, temp_file_path)

Source from the content-addressed store, hash-verified

393
394
395def cleanup_process(process, temp_file_path):
396 """Clean up the target process and temporary file"""
397 with contextlib.suppress(Exception):
398 if process.poll() is None:
399 process.terminate()
400 try:
401 process.wait(timeout=5.0)
402 except subprocess.TimeoutExpired:
403 process.kill()
404 process.wait()
405
406
407def main():

Callers 1

mainFunction · 0.85

Calls 4

pollMethod · 0.45
terminateMethod · 0.45
waitMethod · 0.45
killMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…