xorg-x11-server/xserver-1.3.0-xkb-and-loathing.patch
Adam Jackson 78e07cfbea * Mon Apr 30 2007 Adam Jackson <ajax@redhat.com> 1.3.0.0-3
- xserver-1.3.0-xkb-and-loathing.patch: Ignore (not just block) SIGALRM
  around calls to Popen()/Pclose().  Fixes a hang in openoffice when
  opening menus.
- Modify BuildRequires to use the virtual protocol Provides.
2007-04-30 22:10:31 +00:00

37 lines
832 B
Diff

--- xorg-server-1.3.0.0/os/utils.c.jx 2007-04-25 13:28:05.000000000 -0400
+++ xorg-server-1.3.0.0/os/utils.c 2007-04-30 14:33:04.000000000 -0400
@@ -1725,6 +1725,8 @@
int pid;
} *pidlist;
+static sighandler_t old_alarm = NULL; /* XXX horrible awful hack */
+
pointer
Popen(char *command, char *type)
{
@@ -1746,11 +1748,15 @@
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)
@@ -1926,6 +1932,8 @@
/* allow EINTR again */
OsReleaseSignals ();
+ signal(SIGALRM, old_alarm);
+
return pid == -1 ? -1 : pstat;
}