r15961 - in /desktop/unstable/pygobject/debian: changelog patches/61_wakeupfd-fix.patch

lool at users.alioth.debian.org lool at users.alioth.debian.org
Thu May 15 13:04:49 UTC 2008


Author: lool
Date: Thu May 15 13:04:48 2008
New Revision: 15961

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=15961
Log:
* New patch, 61_wakeupfd-fix, from the fix to the initial SETWAKEUPFD
  support in GNOME #481569.

Added:
    desktop/unstable/pygobject/debian/patches/61_wakeupfd-fix.patch
Modified:
    desktop/unstable/pygobject/debian/changelog

Modified: desktop/unstable/pygobject/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/pygobject/debian/changelog?rev=15961&op=diff
==============================================================================
--- desktop/unstable/pygobject/debian/changelog (original)
+++ desktop/unstable/pygobject/debian/changelog Thu May 15 13:04:48 2008
@@ -1,3 +1,10 @@
+pygobject (2.14.1-5) unstable; urgency=low
+
+  * New patch, 61_wakeupfd-fix, from the fix to the initial SETWAKEUPFD
+    support in GNOME #481569.
+
+ -- Loic Minier <lool at dooz.org>  Thu, 15 May 2008 14:56:58 +0200
+
 pygobject (2.14.1-4) unstable; urgency=low
 
   * Depend and build-depend on libffi-dev >= 3.0.5 so that the older 

Added: desktop/unstable/pygobject/debian/patches/61_wakeupfd-fix.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/pygobject/debian/patches/61_wakeupfd-fix.patch?rev=15961&op=file
==============================================================================
--- desktop/unstable/pygobject/debian/patches/61_wakeupfd-fix.patch (added)
+++ desktop/unstable/pygobject/debian/patches/61_wakeupfd-fix.patch Thu May 15 13:04:48 2008
@@ -1,0 +1,51 @@
+From the fix to the initial SETWAKEUPFD support in GNOME #481569.
+
+--- pygobject-2.14.1/gobject/pygmainloop.c	2008-01-03 12:09:19.000000000 +0100
++++ pygobject-2.14.1.new/gobject/pygmainloop.c	2008-05-15 14:56:28.000000000 +0200
+@@ -24,6 +24,7 @@
+ #ifdef HAVE_CONFIG_H
+ #  include <config.h>
+ #endif
++#include <fcntl.h>
+ 
+ #include "pygobject-private.h"
+ #include "pythread.h"
+@@ -112,7 +113,10 @@
+ pyg_signal_watch_prepare(GSource *source,
+ 			 int     *timeout)
+ {
++#ifdef HAVE_PYSIGNAL_SETWAKEUPFD
+     PySignalWatchSource *real_source = (PySignalWatchSource *)source;
++    int flag;
++#endif
+ 
+     /* Python only invokes signal handlers from the main thread,
+      * so if a thread other than the main thread receives the signal
+@@ -146,6 +150,11 @@
+     real_source->fd.events = G_IO_IN | G_IO_HUP | G_IO_ERR;
+     g_source_add_poll(source, &real_source->fd);
+ 
++    /* 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 */
+@@ -165,11 +174,14 @@
+ {
+     PyGILState_STATE state;
+     GMainLoop *main_loop;
+-
++    PySignalWatchSource *real_source = (PySignalWatchSource *)source;
++    char buf[1];
++	
+     state = pyg_gil_state_ensure();
+ 
+     main_loop = pyg_get_current_main_loop();
+ 
++    read(real_source->fds[0], &buf, 1);
+     if (PyErr_CheckSignals() == -1 && main_loop != NULL) {
+ 	PyErr_SetNone(PyExc_KeyboardInterrupt);
+ 	g_main_loop_quit(main_loop);




More information about the pkg-gnome-commits mailing list