some fixes

This commit is contained in:
Ayzen
2026-06-04 18:33:38 +03:00
parent eacea436a4
commit 22942d9dc9
26 changed files with 1352 additions and 153 deletions
+7 -1
View File
@@ -2,6 +2,7 @@
from __future__ import annotations
from contextlib import suppress
import os
from pathlib import Path
import signal
@@ -63,7 +64,12 @@ def main() -> int:
_install_unix_signal_handlers(app, window)
else:
window.showMaximized()
return app.exec()
exit_code = app.exec()
# Release hardware, SHM readers and child processes before exiting so that a
# systemd restart (after a headless fatal exit) starts from a clean slate.
with suppress(Exception):
window.close()
return exit_code
if __name__ == "__main__":