From fa0b3767f35323fcbbf0cc176a4e27ae12c0d69c Mon Sep 17 00:00:00 2001 From: Claude Code Date: Mon, 30 Mar 2026 10:33:02 -0700 Subject: [PATCH] =?UTF-8?q?infra(tray):=20=F0=9F=A7=B1=20Improve=20process?= =?UTF-8?q?=20management=20by=20updating=20PID=20handling,=20run=20scripts?= =?UTF-8?q?,=20and=20tray/service=20logic=20for=20better=20startup=20relia?= =?UTF-8?q?bility?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Lilith Autocommit --- .godot.pid | 1 - .tray.pid | 1 - run | 3 +++ services/tray/chobit_tray.py | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) delete mode 100644 .godot.pid delete mode 100644 .tray.pid diff --git a/.godot.pid b/.godot.pid deleted file mode 100644 index 05192db..0000000 --- a/.godot.pid +++ /dev/null @@ -1 +0,0 @@ -45729 diff --git a/.tray.pid b/.tray.pid deleted file mode 100644 index 4b5a894..0000000 --- a/.tray.pid +++ /dev/null @@ -1 +0,0 @@ -45730 diff --git a/run b/run index 774b2d1..988cf3a 100755 --- a/run +++ b/run @@ -167,6 +167,9 @@ cmd_stop() { pgrep -f "(chobit_tray|dev_trays)\\.py" | while read -r cpid; do kill "$cpid" 2>/dev/null done || true + pgrep -f "chobit_vision\\.py" | while read -r cpid; do + kill "$cpid" 2>/dev/null + done || true # Stop Godot local stopped=0 diff --git a/services/tray/chobit_tray.py b/services/tray/chobit_tray.py index 06dd5ac..2520981 100644 --- a/services/tray/chobit_tray.py +++ b/services/tray/chobit_tray.py @@ -161,6 +161,7 @@ class ChobitTray(TrayApp): ) super().__init__(config) atexit.register(self._cleanup) + signal.signal(signal.SIGTERM, lambda *_: sys.exit(0)) self._start_command_listener() def _start_command_listener(self) -> None: