From 32396f4be8ca42402d371ca3de18e2c1e7362b9b Mon Sep 17 00:00:00 2001 From: fangliquan Date: Mon, 7 Sep 2026 03:15:41 -0700 Subject: [PATCH] fix(update): retain the detached updater log mirror --- hermes_cli/main_dashboard.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/hermes_cli/main_dashboard.py b/hermes_cli/main_dashboard.py index e482d74e83..c82d62099b 100644 --- a/hermes_cli/main_dashboard.py +++ b/hermes_cli/main_dashboard.py @@ -325,16 +325,14 @@ class _UpdateOutputStream: def _install_hangup_protection(gateway_mode: bool = False): """Protect ``cmd_update`` from SIGHUP (→ SIG_IGN, inherited by pip/git children) and broken pipes (stdio wrapped in ``_UpdateOutputStream``). SIGINT/SIGTERM are left alone — legitimate cancels. - No-op in gateway mode (already detached). Returns state for ``_finalize_update_output``.""" + Gateway updates are already detached, but still need the log mirror for the + Desktop progress watchdog. Returns state for ``_finalize_update_output``.""" state = { "prev_stdout": sys.stdout, "prev_stderr": sys.stderr, "log_file": None, "installed": False} - if gateway_mode: - return state - import signal as _signal - if hasattr(_signal, "SIGHUP"): + if not gateway_mode and hasattr(_signal, "SIGHUP"): # Non-main thread: update still runs, just without hangup protection. with contextlib.suppress(ValueError, OSError): _signal.signal(_signal.SIGHUP, _signal.SIG_IGN)