Skip to content
Prev Previous commit
Next Next commit
fixup
  • Loading branch information
rshaw@neuralmagic.com committed Jan 3, 2025
commit ccc747dad9ed37fed4b255d3cfa2ef2aab81a417
5 changes: 5 additions & 0 deletions vllm/v1/engine/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ def signal_handler(signum, frame):
signal.signal(signal.SIGINT, signal_handler)

parent_process = psutil.Process().parent()
engine_core = None
try:
engine_core = EngineCoreProc(*args, **kwargs)
engine_core.run_busy_loop()
Expand All @@ -199,6 +200,10 @@ def signal_handler(signum, frame):
logger.error("EngineCore hit an exception: %s", traceback)
parent_process.send_signal(signal.SIGQUIT)

finally:
if engine_core is not None:
engine_core.shutdown()

def run_busy_loop(self):
"""Core busy loop of the EngineCore."""

Expand Down