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:
parent
d2bbd09624
commit
fa0b3767f3
4 changed files with 4 additions and 2 deletions
|
|
@ -1 +0,0 @@
|
||||||
45729
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
45730
|
|
||||||
3
run
3
run
|
|
@ -167,6 +167,9 @@ cmd_stop() {
|
||||||
pgrep -f "(chobit_tray|dev_trays)\\.py" | while read -r cpid; do
|
pgrep -f "(chobit_tray|dev_trays)\\.py" | while read -r cpid; do
|
||||||
kill "$cpid" 2>/dev/null
|
kill "$cpid" 2>/dev/null
|
||||||
done || true
|
done || true
|
||||||
|
pgrep -f "chobit_vision\\.py" | while read -r cpid; do
|
||||||
|
kill "$cpid" 2>/dev/null
|
||||||
|
done || true
|
||||||
|
|
||||||
# Stop Godot
|
# Stop Godot
|
||||||
local stopped=0
|
local stopped=0
|
||||||
|
|
|
||||||
|
|
@ -161,6 +161,7 @@ class ChobitTray(TrayApp):
|
||||||
)
|
)
|
||||||
super().__init__(config)
|
super().__init__(config)
|
||||||
atexit.register(self._cleanup)
|
atexit.register(self._cleanup)
|
||||||
|
signal.signal(signal.SIGTERM, lambda *_: sys.exit(0))
|
||||||
self._start_command_listener()
|
self._start_command_listener()
|
||||||
|
|
||||||
def _start_command_listener(self) -> None:
|
def _start_command_listener(self) -> None:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue