MCPcopy
hub / github.com/ModelTC/LightLLM / kill_recursive

Function kill_recursive

lightllm/utils/start_utils.py:101–111  ·  view source on GitHub ↗
(proc)

Source from the content-addressed store, hash-verified

99
100
101def kill_recursive(proc):
102 try:
103 parent = psutil.Process(proc.pid)
104 children = parent.children(recursive=True)
105 for child in children:
106 logger.info(f"Killing child process {child.pid}")
107 child.kill()
108 logger.info(f"Killing parent process {proc.pid}")
109 parent.kill()
110 except psutil.NoSuchProcess:
111 logger.warning(f"Process {proc.pid} does not exist.")
112
113
114process_manager = SubmoduleManager()

Callers 2

signal_handlerFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected