Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Feb 2011 21:50:06 GMT
From:      Antoine Martin <antoine@nagafix.co.uk>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   misc/154755: existing pygtk patch needs to be applied
Message-ID:  <201102132150.p1DLo6O9056153@red.freebsd.org>
Resent-Message-ID: <201102132200.p1DM0JOL085521@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         154755
>Category:       misc
>Synopsis:       existing pygtk patch needs to be applied
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Feb 13 22:00:18 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Antoine Martin
>Release:        8.1
>Organization:
devloop
>Environment:
>Description:
See this upstream bug (includes the patch):

https://bugzilla.gnome.org/show_bug.cgi?id=640738
>How-To-Repeat:
import signal
import gtk

signal.signal(signal.SIGCHLD, lambda *args: None)
gtk.main()

Run it, send it SIGCHLD.  CPU usage goes to 100%.
>Fix:
diff --git a/gtk/gtk.override b/gtk/gtk.override
index 75018f4..7261d9c 100644
--- a/gtk/gtk.override
+++ b/gtk/gtk.override
@@ -1152,8 +1152,9 @@ pygtk_main_watch_check(GSource *source)
     PySignalWatchSource *real_source = (PySignalWatchSource *)source;
     GPollFD *poll_fd = &real_source->fd;
     int data_size = 0;
+    char dummy;
     if (poll_fd->revents & G_IO_IN)
-        data_size = read(poll_fd->fd, 0, 1);
+        data_size = read(poll_fd->fd, &dummy, 1);
 #endif
 
     state = pyg_gil_state_ensure();

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201102132150.p1DLo6O9056153>