infra(tray): 🧱 Improve process management by updating PID handling, run scripts, and tray/service logic for better startup reliability

Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
Claude Code 2026-03-30 10:33:02 -07:00
parent d2bbd09624
commit fa0b3767f3
4 changed files with 4 additions and 2 deletions

View file

@ -1 +0,0 @@
45729

View file

@ -1 +0,0 @@
45730

3
run
View file

@ -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

View file

@ -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: