summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@freedesktop.org>2008-08-05 14:58:48 -0700
committerJeremy Huddleston <jeremyhu@freedesktop.org>2008-08-05 14:58:53 -0700
commit0753882b89a451c9bdd053c2915a80fbcdbb0b77 (patch)
tree36cd0b5847128d8916c73e6b75304b8a82b09013
parent79871c9b9daa1fad1b84af8f7eb54fced7526b2e (diff)
Apple: sleep() to avoid innocent error message spew
-rw-r--r--xinit.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/xinit.c b/xinit.c
index 0336a7b..da155fd 100644
--- a/xinit.c
+++ b/xinit.c
@@ -490,15 +490,23 @@ waitforserver(void)
int ncycles = 120; /* # of cycles to wait */
int cycles; /* Wait cycle count */
+#ifdef __APPLE__
+ /* For Apple, we don't get signaled by the server when it's ready, so we just
+ * want to sleep now since we're going to sleep later anyways and this allows us
+ * to avoid the awkard, "why is there an error message in the log" questions
+ * from users.
+ */
+
+ sleep(2);
+#endif
+
for (cycles = 0; cycles < ncycles; cycles++) {
if ((xd = XOpenDisplay(displayNum))) {
return(TRUE);
}
else {
-#define MSG "X server to begin accepting connections"
- if (!processTimeout (1, MSG))
+ if (!processTimeout (1, "X server to begin accepting connections"))
break;
-#undef MSG
}
}