feat: kill runtime process when exit in stdio mode

This commit is contained in:
Junyan Qin
2025-07-16 22:43:39 +08:00
parent e0abd19636
commit f5b893cfe0
3 changed files with 14 additions and 5 deletions

View File

@@ -52,7 +52,7 @@ async def main(loop: asyncio.AbstractEventLoop):
def signal_handler(sig, frame):
print('[Signal] 程序退出.')
# ap.shutdown()
app_inst.dispose()
os._exit(0)
signal.signal(signal.SIGINT, signal_handler)