1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-22 00:35:15 +00:00

Fix CPU hogging when subprocess terminates.

PR:		ports/154755
Submitted by:	Antoine Martin <antoine@nagafix.co.uk>
Obtained from:	py-gtk upstream
This commit is contained in:
Koop Mast 2011-02-28 11:31:37 +00:00
parent 2ea926669b
commit 45b47603e1
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=269964
2 changed files with 16 additions and 1 deletions

View File

@ -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/}

View File

@ -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();