summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston Sequoia <jeremyhu@apple.com>2014-04-06 05:32:00 -0700
committerMatt Dew <marcoz@osource.org>2014-04-14 19:06:24 -0600
commitf665960c7aa6e4ebd7e927c1697339edc0ee88ef (patch)
treee966bd30baa8a3fc0ef978134b592308684d7bb6
parent46bcfa0a33123ba8d8dc0ee183cfd8d7fa3e063b (diff)
XQuartz: Ensure we wait for the server thread to terminateserver-1.14-branch
AKA: XQuartz 2.7.5 doesn't delete its /tmp/.X$d-lock http://xquartz.macosforge.org/trac/ticket/823 Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-rw-r--r--hw/xquartz/X11Controller.m5
1 files changed, 2 insertions, 3 deletions
diff --git a/hw/xquartz/X11Controller.m b/hw/xquartz/X11Controller.m
index 5445c6f3a..022e83258 100644
--- a/hw/xquartz/X11Controller.m
+++ b/hw/xquartz/X11Controller.m
@@ -942,9 +942,8 @@ extern char *bundle_id_prefix;
/* shutdown the X server, it will exit () for us. */
DarwinSendDDXEvent(kXquartzQuit, 0);
- /* In case it doesn't, exit anyway after a while. */
- remain = 10000000;
- while ((remain = usleep(remain)) > 0) ;
+ /* In case it doesn't, exit anyway after 5s. */
+ [NSThread sleepForTimeInterval:5.0];
exit(1);
}