xwayland: Don't dup() displayfd pipe
For some reason, this causes the reads to get completely lost sometimes in CI. Signed-off-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
@@ -134,11 +134,6 @@ spawn_xserver(void *user_data, const char *display, int abstract_fd, int unix_fd
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (os_fd_set_cloexec(display_fd[1]) != 0) {
|
|
||||||
weston_log("failed setting Xwayland end of displayfd as cloexec\n");
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
pid = fork();
|
pid = fork();
|
||||||
switch (pid) {
|
switch (pid) {
|
||||||
case 0:
|
case 0:
|
||||||
@@ -153,12 +148,16 @@ spawn_xserver(void *user_data, const char *display, int abstract_fd, int unix_fd
|
|||||||
ret &= dup_fd_to_string(abstract_fd_str, abstract_fd);
|
ret &= dup_fd_to_string(abstract_fd_str, abstract_fd);
|
||||||
ret &= dup_fd_to_string(unix_fd_str, unix_fd);
|
ret &= dup_fd_to_string(unix_fd_str, unix_fd);
|
||||||
ret &= dup_fd_to_string(wm_fd_str, wm[1]);
|
ret &= dup_fd_to_string(wm_fd_str, wm[1]);
|
||||||
ret &= dup_fd_to_string(display_fd_str, display_fd[1]);
|
|
||||||
if (!ret)
|
if (!ret)
|
||||||
_exit(EXIT_FAILURE);
|
_exit(EXIT_FAILURE);
|
||||||
|
|
||||||
setenv("WAYLAND_SOCKET", wayland_socket_str, 1);
|
setenv("WAYLAND_SOCKET", wayland_socket_str, 1);
|
||||||
|
|
||||||
|
if (snprintf(display_fd_str, sizeof(display_fd_str), "%d",
|
||||||
|
display_fd[1]) <= 0) {
|
||||||
|
_exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
|
||||||
if (execl(xserver,
|
if (execl(xserver,
|
||||||
xserver,
|
xserver,
|
||||||
display,
|
display,
|
||||||
|
|||||||
Reference in New Issue
Block a user