summaryrefslogtreecommitdiff
path: root/gi
diff options
context:
space:
mode:
authorSimon Feltman <sfeltman@src.gnome.org>2013-10-27 16:02:13 -0700
committerSimon Feltman <sfeltman@src.gnome.org>2013-10-27 22:27:18 -0700
commit57195c9c864bc25521bb3cb98286e6d6f0645652 (patch)
treeda0fa92c6b6f233a9adb97bab3db67de512f751f /gi
parent1c03ebba9598e7b6d5293889f46b015bfac3611c (diff)
downloadpygobject-57195c9c864bc25521bb3cb98286e6d6f0645652.tar.gz
Add consistent GLib.MainLoop SIGINT cleanup
Remove auto cleanup of SIGINT source handling by returning True from the signal callback. This gives the __del__ method consistent cleanup semantics regardless of whether or not a SIGINT occurred. https://bugzilla.gnome.org/show_bug.cgi?id=710978
Diffstat (limited to 'gi')
-rw-r--r--gi/overrides/GLib.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/gi/overrides/GLib.py b/gi/overrides/GLib.py
index 8f18682f..fc258823 100644
--- a/gi/overrides/GLib.py
+++ b/gi/overrides/GLib.py
@@ -507,6 +507,10 @@ class MainLoop(GLib.MainLoop):
def _handler(loop):
loop.quit()
loop._quit_by_sigint = True
+ # We handle signal deletion in __del__, return True so GLib
+ # doesn't do the deletion for us.
+ return True
+
if sys.platform != 'win32':
# compatibility shim, keep around until we depend on glib 2.36
if hasattr(GLib, 'unix_signal_add'):