XQuartz: Added more debugging to handoff spew
(cherry picked from commit acefa7e3c8706ffedc052effd50b36ce10e72c22)
This commit is contained in:
parent
47d3821870
commit
0fca8588a2
|
@ -178,17 +178,15 @@ static void send_fd_handoff(int connected_fd, int launchd_fd) {
|
||||||
|
|
||||||
*((int*)CMSG_DATA(cmsg)) = launchd_fd;
|
*((int*)CMSG_DATA(cmsg)) = launchd_fd;
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
fprintf(stderr, "Xquartz: Handoff connection established. Sending message.\n");
|
|
||||||
#endif
|
|
||||||
if(sendmsg(connected_fd, &msg, 0) < 0) {
|
if(sendmsg(connected_fd, &msg, 0) < 0) {
|
||||||
fprintf(stderr, "Xquartz: Error sending $DISPLAY file descriptor: %s\n", strerror(errno));
|
fprintf(stderr, "Xquartz: Error sending $DISPLAY file descriptor over fd %d: %d -- %s\n", connected_fd, errno, strerror(errno));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf(stderr, "Xquartz: Message sent. Closing.\n");
|
fprintf(stderr, "Xquartz: Message sent. Closing handoff fd.\n");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
close(connected_fd);
|
close(connected_fd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -286,6 +284,10 @@ int main(int argc, char **argv, char **envp) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
|
fprintf(stderr, "Xquartz: Handoff connection established (try %d of %d) on fd %d, \"%s\". Sending message.\n", (int)try+1, (int)try_max, handoff_fd, handoff_socket_filename);
|
||||||
|
#endif
|
||||||
|
|
||||||
send_fd_handoff(handoff_fd, launchd_fd);
|
send_fd_handoff(handoff_fd, launchd_fd);
|
||||||
close(handoff_fd);
|
close(handoff_fd);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue