summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@freedesktop.org>2008-06-04 12:19:28 -0700
committerJeremy Huddleston <jeremyhu@freedesktop.org>2008-06-04 12:24:15 -0700
commit40855d8000b9b9f4e6c6b4317542378ecf516345 (patch)
tree35abdd8b5005fd603f3d25e6c85e5920dfa05042
parentee86b751192b690973ee2a1446a406bc721ce8eb (diff)
XQuartz: Removed async debugging sleep
(cherry picked from commit 7812a8bdf9fab651ea5c07b852b2999547ec628d)
-rw-r--r--hw/xquartz/darwinEvents.c4
-rw-r--r--hw/xquartz/mach-startup/bundle-main.c7
2 files changed, 7 insertions, 4 deletions
diff --git a/hw/xquartz/darwinEvents.c b/hw/xquartz/darwinEvents.c
index 1e79cd3bc..151aaa0a6 100644
--- a/hw/xquartz/darwinEvents.c
+++ b/hw/xquartz/darwinEvents.c
@@ -101,8 +101,10 @@ static inline void darwinEvents_lock(void) {
* when darwinEvents == NULL
*
* TODO: Cleanup this race more elegantly.
+ *
+ * For some reason, xinitrc doesn't run until after this anyways... =/
+ * sleep(2);
*/
- sleep(2);
}
}
diff --git a/hw/xquartz/mach-startup/bundle-main.c b/hw/xquartz/mach-startup/bundle-main.c
index 1c325186a..d7b6c3753 100644
--- a/hw/xquartz/mach-startup/bundle-main.c
+++ b/hw/xquartz/mach-startup/bundle-main.c
@@ -160,9 +160,7 @@ static void accept_fd_handoff(int connected_fd) {
if(launchd_fd == -1)
fprintf(stderr, "Error receiving $DISPLAY file descriptor, no descriptor received? %d\n", launchd_fd);
- fprintf(stderr, "Received new DISPLAY fd (1): %d\n", launchd_fd);
- sleep(10);
- fprintf(stderr, "Received new DISPLAY fd (2): %d\n", launchd_fd);
+ fprintf(stderr, "Received new DISPLAY fd: %d\n", launchd_fd);
DarwinListenOnOpenFD(launchd_fd);
}
@@ -354,6 +352,9 @@ int main(int argc, char **argv, char **envp) {
/* Could open the display, start the launcher */
XCloseDisplay(display);
+ /* TODO: Clean up this race better... givint xinitrc time to run. */
+ sleep(2);
+
return execute(command_from_prefs("app_to_run", DEFAULT_CLIENT));
}
}