From: stack Date: Sun, 8 Jul 2012 18:19:50 +0000 (+0200) Subject: makes the Qt application quit upong sigint X-Git-Url: https://v.licheni.net/stack/code/dboxswitch.git/commitdiff_plain/ba2d0ed5c1e067a34a4c6de1dcd9fbe86d35e34a?ds=inline;hp=d06f73c1045d0a4b526f4662869bb2cd121eabde makes the Qt application quit upong sigint --- diff --git a/main.py b/main.py index 2c187cb..58ac693 100755 --- a/main.py +++ b/main.py @@ -33,6 +33,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. """ + +import signal + from profhandler import ProfHandler from gui import Gui from PyQt4 import QtGui @@ -40,6 +43,8 @@ from PyQt4 import QtGui from settings import appconf if __name__ == '__main__': + #makes the application quit upon sigint + signal.signal(signal.SIGINT, signal.SIG_DFL) #Application init prManager = ProfHandler()