summaryrefslogtreecommitdiff
path: root/hw/xquartz
diff options
context:
space:
mode:
authorJeremy Huddleston Sequoia <jeremyhu@apple.com>2014-04-06 05:32:00 -0700
committerJeremy Huddleston Sequoia <jeremyhu@apple.com>2014-04-06 05:32:03 -0700
commitec6007e6f7772a90713c9c51c64359229961ce27 (patch)
tree6417354904b9a5d582e564c607be7af9b425adac /hw/xquartz
parent901fbfbbbd71c0d82080957f8ba09eebbc786f2b (diff)
XQuartz: Ensure we wait for the server thread to terminate
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>
Diffstat (limited to 'hw/xquartz')
-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);
}