summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@freedesktop.org>2009-09-06 14:02:53 -0700
committerJeremy Huddleston <jeremyhu@freedesktop.org>2009-09-06 14:06:28 -0700
commit1e0caf9a2ca983f171976822d9c04bacc14e9af7 (patch)
treeb22810eeb7823cf16cc21109e5abc13caaad2162
parent081f72390a25e2244561e238f772f98289a6a581 (diff)
XQuartz: launchd: Fallback on :0 if prefix:0 gives an error for the socket name
(cherry picked from commit 647c871dc9f2d0adc172b401cde89ffbdfcc4d7a)
-rw-r--r--hw/xquartz/mach-startup/launchd_fd.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/hw/xquartz/mach-startup/launchd_fd.c b/hw/xquartz/mach-startup/launchd_fd.c
index 51017d630..fa623ea12 100644
--- a/hw/xquartz/mach-startup/launchd_fd.c
+++ b/hw/xquartz/mach-startup/launchd_fd.c
@@ -71,8 +71,11 @@ int launchd_display_fd() {
listening_fd_array = launch_data_dict_lookup(sockets_dict, LAUNCHD_ID_PREFIX":0");
if (NULL == listening_fd_array) {
- fprintf(stderr,"launchd check-in: No known sockets found to answer requests on! %s failed.\n", LAUNCHD_ID_PREFIX".startx:0");
- return ERROR_FD;
+ listening_fd_array = launch_data_dict_lookup(sockets_dict, ":0");
+ if (NULL == listening_fd_array) {
+ fprintf(stderr,"launchd check-in: No known sockets found to answer requests on! \"%s:0\" and \":0\" failed.\n", LAUNCHD_ID_PREFIX);
+ return ERROR_FD;
+ }
}
if (launch_data_array_get_count(listening_fd_array)!=1) {