mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-02 05:20:33 +08:00
_terminate and _kill_port_listeners wrapped every tree signal in bare except-pass blocks, so a child or port listener the signals could not reach survived shutdown with no log line to trace: zombie children and occupied ports after restart, with nothing to investigate. Signal delivery now goes through _signal_target, which logs each failure at WARNING with its cause; the SIGTERM -> wait -> SIGKILL ladder and its timeouts are unchanged. A target that is already gone is not a failure: ESRCH from os.kill/os.killpg is treated as terminated, and on Windows _send_tree_signal now checks taskkill's exit code, staying quiet for its "process not found" (128) while raising for real failures such as access denied, so the Windows path is observable too. Co-authored-by: XZH <cto@xzh.ai>