Gentoo Archives: gentoo-commits

From: "Pacho Ramos (pacho)" <pacho@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-python/pygtk/files: pygtk-2.22.0-wakeupfd-fix.patch
Date: Thu, 03 Feb 2011 21:43:18
Message-Id: 20110203214307.7427F20057@flycatcher.gentoo.org
1 pacho 11/02/03 21:43:07
2
3 Added: pygtk-2.22.0-wakeupfd-fix.patch
4 Log:
5 Fix 100% CPU load when apps receive SIGCHLD, bug #353599 by Antoine Martin.
6
7 (Portage version: 2.1.9.35/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.1 dev-python/pygtk/files/pygtk-2.22.0-wakeupfd-fix.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/pygtk/files/pygtk-2.22.0-wakeupfd-fix.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/pygtk/files/pygtk-2.22.0-wakeupfd-fix.patch?rev=1.1&content-type=text/plain
14
15 Index: pygtk-2.22.0-wakeupfd-fix.patch
16 ===================================================================
17 From 4cbd3c031289775f365c247f949d91facac4ba82 Mon Sep 17 00:00:00 2001
18 From: Dieter Verfaillie <dieterv@××××××××××××××.be>
19 Date: Thu, 03 Feb 2011 12:44:10 +0000
20 Subject: Fix pygtk_main_watch_check, copied from pygobject/glib/pygmainloop.c:pyg_signal_watch_check.
21
22 Fixes bug 640738 and 638780.
23 ---
24 diff --git a/gtk/gtk.override b/gtk/gtk.override
25 index 75018f4..94309a6 100644
26 --- a/gtk/gtk.override
27 +++ b/gtk/gtk.override
28 @@ -1151,9 +1151,10 @@ pygtk_main_watch_check(GSource *source)
29 #ifdef HAVE_PYSIGNAL_SETWAKEUPFD
30 PySignalWatchSource *real_source = (PySignalWatchSource *)source;
31 GPollFD *poll_fd = &real_source->fd;
32 - int data_size = 0;
33 + unsigned char dummy;
34 + gssize ret;
35 if (poll_fd->revents & G_IO_IN)
36 - data_size = read(poll_fd->fd, 0, 1);
37 + ret = read(poll_fd->fd, &dummy, 1);
38 #endif
39
40 state = pyg_gil_state_ensure();
41 --
42 cgit v0.8.3.1