diff -u pygtk-2.22.0/debian/changelog pygtk-2.22.0/debian/changelog --- pygtk-2.22.0/debian/changelog +++ pygtk-2.22.0/debian/changelog @@ -1,3 +1,13 @@ +pygtk (2.22.0-0ubuntu1.1) natty-proposed; urgency=low + + * debian/patches/04_fix_100%_cpu_in_signal_handling.patch: + - Upstream patch to fix thinko in pygtk signal handler glib source. + Without this, the source _check function would read 0 bytes from the fd, + resulting in the fd always having input and hence a busy-loop. + Fixes 100% CPU usage in a variety of pygtk-using apps (LP: #664920) + + -- Christopher James Halse Rogers Tue, 26 Apr 2011 17:56:56 +1000 + pygtk (2.22.0-0ubuntu1) natty; urgency=low * New upstream release diff -u pygtk-2.22.0/debian/patches/series pygtk-2.22.0/debian/patches/series --- pygtk-2.22.0/debian/patches/series +++ pygtk-2.22.0/debian/patches/series @@ -3,0 +4 @@ +04_fix_100%_cpu_in_signal_handling.patch only in patch2: unchanged: --- pygtk-2.22.0.orig/debian/patches/04_fix_100%_cpu_in_signal_handling.patch +++ pygtk-2.22.0/debian/patches/04_fix_100%_cpu_in_signal_handling.patch @@ -0,0 +1,26 @@ +From 4cbd3c031289775f365c247f949d91facac4ba82 Mon Sep 17 00:00:00 2001 +From: Dieter Verfaillie +Date: Thu, 03 Feb 2011 12:44:10 +0000 +Subject: Fix pygtk_main_watch_check, copied from pygobject/glib/pygmainloop.c:pyg_signal_watch_check. + +Fixes bug 640738 and 638780. +--- +diff --git a/gtk/gtk.override b/gtk/gtk.override +index 75018f4..94309a6 100644 +--- a/gtk/gtk.override ++++ b/gtk/gtk.override +@@ -1151,9 +1151,10 @@ pygtk_main_watch_check(GSource *source) + #ifdef HAVE_PYSIGNAL_SETWAKEUPFD + PySignalWatchSource *real_source = (PySignalWatchSource *)source; + GPollFD *poll_fd = &real_source->fd; +- int data_size = 0; ++ unsigned char dummy; ++ gssize ret; + if (poll_fd->revents & G_IO_IN) +- data_size = read(poll_fd->fd, 0, 1); ++ ret = read(poll_fd->fd, &dummy, 1); + #endif + + state = pyg_gil_state_ensure(); +-- +cgit v0.9