summaryrefslogtreecommitdiff
path: root/src/frontend/gui/sisyphus-qt6.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontend/gui/sisyphus-qt6.py')
-rw-r--r--src/frontend/gui/sisyphus-qt6.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/frontend/gui/sisyphus-qt6.py b/src/frontend/gui/sisyphus-qt6.py
index 181fa64..ace6c8b 100644
--- a/src/frontend/gui/sisyphus-qt6.py
+++ b/src/frontend/gui/sisyphus-qt6.py
@@ -2,6 +2,7 @@
import sys
import sqlite3
+import signal
import sisyphus
from collections import OrderedDict
from PyQt6 import QtCore, QtGui, QtWidgets, uic
@@ -11,6 +12,7 @@ class Sisyphus(QtWidgets.QMainWindow):
def __init__(self):
super(Sisyphus, self).__init__()
uic.loadUi('/usr/share/sisyphus/ui/sisyphus.ui', self)
+ signal.signal(signal.SIGTERM, self.handleSigterm)
self.centerOnScreen()
self.show()
@@ -285,6 +287,9 @@ class Sisyphus(QtWidgets.QMainWindow):
def sisyphusExit(self):
self.close()
+ def handleSigterm(self, signum, frame):
+ self.close()
+
def __del__(self):
sys.stdout = sys.__stdout__ # restore stdout