diff options
author | Donnie Berkholz <dberkholz@gentoo.org> | 2007-11-07 08:52:12 +0000 |
---|---|---|
committer | Donnie Berkholz <dberkholz@gentoo.org> | 2007-11-07 08:52:12 +0000 |
commit | 9a16f03fb9a2bfb970cbe2fc6db500c24c1f64cc (patch) | |
tree | 49eed53f75c6f9376fadd94667f31587a0ab6966 /x11-base/xorg-server | |
parent | Add a post-installation notice about the new sloppy locking. (diff) | |
download | gentoo-2-9a16f03fb9a2bfb970cbe2fc6db500c24c1f64cc.tar.gz gentoo-2-9a16f03fb9a2bfb970cbe2fc6db500c24c1f64cc.tar.bz2 gentoo-2-9a16f03fb9a2bfb970cbe2fc6db500c24c1f64cc.zip |
(#197104) Fix a 100% CPU hang on openoffice. (#196019) Don't create a redundant file with USE=xprint.
(Portage version: 2.1.3.17)
Diffstat (limited to 'x11-base/xorg-server')
-rw-r--r-- | x11-base/xorg-server/ChangeLog | 8 | ||||
-rw-r--r-- | x11-base/xorg-server/files/1.3.0.0-fix-xkb-openoffice-hangs.patch | 55 | ||||
-rw-r--r-- | x11-base/xorg-server/xorg-server-1.3.0.0-r2.ebuild | 9 |
3 files changed, 70 insertions, 2 deletions
diff --git a/x11-base/xorg-server/ChangeLog b/x11-base/xorg-server/ChangeLog index ea0a4ecc497c..72b2622fd270 100644 --- a/x11-base/xorg-server/ChangeLog +++ b/x11-base/xorg-server/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for x11-base/xorg-server # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/x11-base/xorg-server/ChangeLog,v 1.292 2007/11/05 18:42:34 dberkholz Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-base/xorg-server/ChangeLog,v 1.293 2007/11/07 08:52:11 dberkholz Exp $ + + 07 Nov 2007; Donnie Berkholz <dberkholz@gentoo.org>; + +files/1.3.0.0-fix-xkb-openoffice-hangs.patch, + xorg-server-1.3.0.0-r2.ebuild: + (#197104) Fix a 100% CPU hang on openoffice. (#196019) Don't create a + redundant file with USE=xprint. 05 Nov 2007; Donnie Berkholz <dberkholz@gentoo.org>; xorg-server-1.2.0-r3.ebuild, xorg-server-1.3.0.0.ebuild, diff --git a/x11-base/xorg-server/files/1.3.0.0-fix-xkb-openoffice-hangs.patch b/x11-base/xorg-server/files/1.3.0.0-fix-xkb-openoffice-hangs.patch new file mode 100644 index 000000000000..88df93b5bc57 --- /dev/null +++ b/x11-base/xorg-server/files/1.3.0.0-fix-xkb-openoffice-hangs.patch @@ -0,0 +1,55 @@ +https://bugs.gentoo.org/show_bug.cgi?id=197104 + +commit a5b8053606d6e786cdcf6734f271acc05f9cc588 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Tue Sep 11 11:37:06 2007 -0400 + + Ignore - not just block - SIGALRM around Popen()/Pclose(). + + Because our "popen" implementation uses stdio, and because nobody's stdio + library is capable of surviving signals, we need to make absolutely sure + that we hide the SIGALRM from the smart scheduler. Otherwise, when you + open a menu in openoffice, and it recompiles XKB to deal with the + accelerators, and you popen xkbcomp because we suck, then the scheduler + will tell you you're taking forever doing something stupid, and the + wait() code will get confused, and input will hang and your CPU usage + slams to 100%. Down, not across. + +diff --git a/os/utils.c b/os/utils.c +index 3bb7dbe..afcaae4 100644 +--- a/os/utils.c ++++ b/os/utils.c +@@ -1720,6 +1720,8 @@ static struct pid { + int pid; + } *pidlist; + ++static sighandler_t old_alarm = NULL; /* XXX horrible awful hack */ ++ + pointer + Popen(char *command, char *type) + { +@@ -1741,11 +1743,15 @@ Popen(char *command, char *type) + return NULL; + } + ++ /* Ignore the smart scheduler while this is going on */ ++ old_alarm = signal(SIGALRM, SIG_IGN); ++ + switch (pid = fork()) { + case -1: /* error */ + close(pdes[0]); + close(pdes[1]); + xfree(cur); ++ signal(SIGALRM, old_alarm); + return NULL; + case 0: /* child */ + if (setgid(getgid()) == -1) +@@ -1921,6 +1927,8 @@ Pclose(pointer iop) + /* allow EINTR again */ + OsReleaseSignals (); + ++ signal(SIGALRM, old_alarm); ++ + return pid == -1 ? -1 : pstat; + } + diff --git a/x11-base/xorg-server/xorg-server-1.3.0.0-r2.ebuild b/x11-base/xorg-server/xorg-server-1.3.0.0-r2.ebuild index edd73716134c..ae35a7484b98 100644 --- a/x11-base/xorg-server/xorg-server-1.3.0.0-r2.ebuild +++ b/x11-base/xorg-server/xorg-server-1.3.0.0-r2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/x11-base/xorg-server/xorg-server-1.3.0.0-r2.ebuild,v 1.1 2007/10/13 20:52:35 dberkholz Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-base/xorg-server/xorg-server-1.3.0.0-r2.ebuild,v 1.2 2007/11/07 08:52:11 dberkholz Exp $ # Must be before x-modular eclass is inherited SNAPSHOT="yes" @@ -263,6 +263,7 @@ PDEPEND=" LICENSE="${LICENSE} MIT" PATCHES=" + ${FILESDIR}/${PV}-fix-xkb-openoffice-hangs.patch ${FILESDIR}/${PV}-fix-dual-head-screen-resolutions.patch ${FILESDIR}/${PV}-fix-randr-resizing.patch ${FILESDIR}/${PV}-fix-xephyr-amd64-segfault.patch @@ -354,6 +355,12 @@ src_unpack() { fi fi x-modular_reconf_source + #do not install xprint's Xsession.d files, we'll do it later + if use xprint; then + sed -e "s:install-data-am\: install-dist_xpcDATA:install-data-am\::g" \ + -i "${S}"/hw/xprint/etc/Xsession.d/Makefile.in \ + || die "sed of Xsession.d makefile failed" + fi } src_install() { |