diff options
Diffstat (limited to 'src/frontend/gui/sisyphus-qt5.py')
-rw-r--r-- | src/frontend/gui/sisyphus-qt5.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/frontend/gui/sisyphus-qt5.py b/src/frontend/gui/sisyphus-qt5.py index 16c473c..939feae 100644 --- a/src/frontend/gui/sisyphus-qt5.py +++ b/src/frontend/gui/sisyphus-qt5.py @@ -2,6 +2,7 @@ import sys import sqlite3 +import signal import sisyphus from collections import OrderedDict from PyQt5 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 |