Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 151747 Details for
Bug 197104
x11-base/xorg-server-1.3 and 1.4 consumes 100% CPU, locking the keyboard, apparently triggered by opening an OpenOffice pulldown menu
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch using sigaction instead of signal (no glibc-only extensions)
1.4-dont-hang-openoffice.patch (text/plain), 2.21 KB, created by
Billy Dorminy
on 2008-05-04 03:52:46 UTC
(
hide
)
Description:
patch using sigaction instead of signal (no glibc-only extensions)
Filename:
MIME Type:
Creator:
Billy Dorminy
Created:
2008-05-04 03:52:46 UTC
Size:
2.21 KB
patch
obsolete
>Title : x11-base/xorg-server-1.3 and 1.4 consumes 100% CPU, locking the ke >yboard, apparently triggered by opening an OpenOffice pulldown menu >Assignee : x11@gentoo.org >Reported : 2007-10-26 03:51 0000 >Updated : 2007-11-07 07:21:56 0000 >Status : NEW >URL : https://bugs.freedesktop.org/show_bug.cgi?id=10525 >Severity : critical >Priority : P2 >Reporter : smw@alcor.concordia.ca >Product : Gentoo Linux >Component : Server >Keywords : Inclusion >CC : tetromino@gmail.com >Comments : 3 >Attachments : 0 >URL : http://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 struct sigaction *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 */ >+ sigaction(SIGALRM, SIG_IGN, old_alarm); >+ > switch (pid = fork()) { > case -1: /* error */ > close(pdes[0]); > close(pdes[1]); > xfree(cur); >+ sigaction(SIGALRM, old_alarm, NULL); > return NULL; > case 0: /* child */ > if (setgid(getgid()) == -1) >@@ -1921,6 +1927,8 @@ Pclose(pointer iop) > /* allow EINTR again */ > OsReleaseSignals (); > >+ sigaction(SIGALRM, old_alarm,NULL); >+ > return pid == -1 ? -1 : pstat; > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 197104
: 151747