some fixes
This commit is contained in:
@@ -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__":
|
||||
|
||||
Reference in New Issue
Block a user