--- a/gtk/gtk.override
+++ b/gtk/gtk.override
@@ -36,6 +36,8 @@
 
 #include "pygtk-private.h"
 
+#include <fcntl.h>
+
 #define PYGTK_CONTAINER_FOREACH 0
 #define PYGTK_CONTAINER_FORALL 1
 #define countof(array) (sizeof(array)/sizeof(array[0]))
@@ -1147,6 +1149,12 @@
         real_source->fd.events = G_IO_IN | G_IO_HUP | G_IO_ERR;
         g_source_add_poll(source, &real_source->fd);
 
+        int flag;
+        /* Make the read end of the fd non blocking */
+        flag = fcntl(real_source->fds[0], F_GETFL, 0);
+        flag |= O_NONBLOCK;
+        fcntl(real_source->fds[0], F_SETFL, flag);
+
         PySignal_SetWakeupFd(real_source->fds[1]);
     }
 #else /* !HAVE_PYSIGNAL_SETWAKEUPFD */
@@ -1166,8 +1174,18 @@
 {
     PyGILState_STATE state;
 
+#ifdef HAVE_PYSIGNAL_SETWAKEUPFD
+    PySignalWatchSource *real_source = (PySignalWatchSource *)source;
+    char buf[1];
+#endif
+
     state = pyg_gil_state_ensure();
 
+#ifdef HAVE_PYSIGNAL_SETWAKEUPFD
+    if (real_source->fds[0])
+        read(real_source->fds[0], &buf, 1);
+#endif
+
     if (PyErr_CheckSignals() == -1 && gtk_main_level() > 0) {
 	PyErr_SetNone(PyExc_KeyboardInterrupt);
 	gtk_main_quit();
