fixup! Catch signals to perform cleanup tasks

Yikes, a that previous commit was in an in-between state and should not
have been pushed!
This commit is contained in:
Wieland Hoffmann
2014-03-06 23:24:24 +01:00
parent 0e0c375745
commit f2d0ea7777

View File

@@ -106,9 +106,9 @@ class Tagger(QtGui.QApplication):
if not sys.platform == "win32":
# Set up signal handling
self.signalfd = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM, 0)
self.signalfd = socket.socketpair(socket.AF_UNIX, socket.SOCK_STREAM, 0)
self.signalnotifier = QtCore.QSocketNotifier(self.signalfd.fileno(),
self.signalnotifier = QtCore.QSocketNotifier(self.signalfd[1].fileno(),
QtCore.QSocketNotifier.Read, self)
self.signalnotifier.activated.connect(self.sighandler)