From 45b47603e1777051d393c7a55ae4d5430e1d0710 Mon Sep 17 00:00:00 2001 From: Koop Mast Date: Mon, 28 Feb 2011 11:31:37 +0000 Subject: [PATCH] Fix CPU hogging when subprocess terminates. PR: ports/154755 Submitted by: Antoine Martin Obtained from: py-gtk upstream --- x11-toolkits/py-gtk2/Makefile | 2 +- x11-toolkits/py-gtk2/files/patch-gtk_gtk.override | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 x11-toolkits/py-gtk2/files/patch-gtk_gtk.override diff --git a/x11-toolkits/py-gtk2/Makefile b/x11-toolkits/py-gtk2/Makefile index 700412b5bfe3..eb2b0663414f 100644 --- a/x11-toolkits/py-gtk2/Makefile +++ b/x11-toolkits/py-gtk2/Makefile @@ -8,7 +8,7 @@ PORTNAME= gtk PORTVERSION= 2.22.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= x11-toolkits python MASTER_SITES= GNOME MASTER_SITE_SUBDIR= sources/pygtk/${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/} diff --git a/x11-toolkits/py-gtk2/files/patch-gtk_gtk.override b/x11-toolkits/py-gtk2/files/patch-gtk_gtk.override new file mode 100644 index 000000000000..668fafa8ce22 --- /dev/null +++ b/x11-toolkits/py-gtk2/files/patch-gtk_gtk.override @@ -0,0 +1,15 @@ +--- gtk/gtk.override.orig 2011-02-28 12:22:04.000000000 +0100 ++++ gtk/gtk.override 2011-02-28 12:23:00.000000000 +0100 +@@ -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();