wayland: Do not fail on stalled .X11-unix entries

If for whatever reason, there are stalled files in /tmp/.X11-unix/ the
bind() to the abstract socket will succeed but not the bind() to the
to the UNIX socket.

This causes gnome-shell/mutter to fail because it cannot start Xwayland
(while it could actually, by using a different display).

In case of failure to bind to the UNIX socket, try the next display
instead of failing, to avoid stalled entries in /tmp/.X11-unix.

Closes: https://gitlab.gnome.org/GNOME/mutter/issues/13
This commit is contained in:
Olivier Fourdan 2018-02-02 16:35:26 +01:00
parent d8f2f583e6
commit 589e999049

View File

@ -465,7 +465,8 @@ choose_xdisplay (MetaXWaylandManager *manager)
{
unlink (lock_file);
close (manager->abstract_fd);
return FALSE;
display++;
continue;
}
break;