summaryrefslogtreecommitdiff
path: root/xinit.c
diff options
context:
space:
mode:
authorKaleb Keithley <kaleb@freedesktop.org>2003-11-26 22:49:11 +0000
committerKaleb Keithley <kaleb@freedesktop.org>2003-11-26 22:49:11 +0000
commit76fe43f3e1a0ecda6998f4e96d707e39a19f566e (patch)
tree9d3f67c6c2ac960f893bb3daaf2d8f1fb2bcad39 /xinit.c
parent7ac8228123639c28b6d106505ce513072714cdcd (diff)
merge latest (4.3.99.16) from XFree86 (vendor) branchXEVIE-BASE
Diffstat (limited to 'xinit.c')
-rw-r--r--xinit.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/xinit.c b/xinit.c
index ad6cdc1..62cf248 100644
--- a/xinit.c
+++ b/xinit.c
@@ -25,7 +25,7 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
-/* $XFree86: xc/programs/xinit/xinit.c,v 3.32 2002/05/31 18:46:13 dawes Exp $ */
+/* $XFree86: xc/programs/xinit/xinit.c,v 3.33 2003/06/10 17:03:56 dawes Exp $ */
#include <X11/Xlib.h>
#include <X11/Xos.h>
@@ -549,6 +549,9 @@ startServer(char *server[])
#else
int old;
#endif
+#ifdef __UNIXOS2__
+ sigset_t pendings;
+#endif
#if !defined(X_NOT_POSIX)
sigemptyset(&mask);
@@ -637,6 +640,17 @@ startServer(char *server[])
alarm (15);
#ifndef X_NOT_POSIX
+#ifdef __UNIXOS2__
+ /*
+ * fg2003/05/06: work around a problem in EMX: sigsuspend()
+ * does not deliver pending signals when called but when
+ * returning; so if SIGUSR1 has already been sent by the
+ * server, we would still have to await SIGALRM
+ */
+ sigemptyset(&pendings);
+ sigpending(&pendings);
+ if (!sigismember(&pendings, SIGUSR1))
+#endif /* __UNIXOS2__ */
sigsuspend(&old);
alarm (0);
sigprocmask(SIG_SETMASK, &old, NULL);