Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wayland-server: There is no way to bind to a passed socket FD #746

Open
Ferdi265 opened this issue Jul 22, 2024 · 1 comment
Open

wayland-server: There is no way to bind to a passed socket FD #746

Ferdi265 opened this issue Jul 22, 2024 · 1 comment

Comments

@Ferdi265
Copy link

Ferdi265 commented Jul 22, 2024

ListeningSocket in wayland-server has no constructor that takes an OwnedFD, which makes it impossible to use it to implement Wayland socket handover as described in the KDE wiki.

Wayland socket handover makes it possible for a compositor to recover from crashes without the whole session dying with it, and also makes it possible to implement things like Systemd socket activation for Wayland in the future.

What's missing is a constructor for ListeningSocket that takes an OwnedFD and the socket name, and uses wl_display_add_socket_fd() to add the socket FD to the display. As far as I know, the lock file is supposed to be locked by the creator of the socket, not the receiving compositor.

@Ferdi265 Ferdi265 changed the title wayland-server: ListeningSocket has no way to bind to an passed socketFD wayland-server: ListeningSocket has no way to bind to a passed socket FD Jul 22, 2024
@Ferdi265
Copy link
Author

I looked at the implementation of ListeningSocket and it seems to be built on the assumption that it owns the socket and the lock file. If I understand this correctly, a passed socket that is not owned by the compositor would need a different wrapper type then.

@Ferdi265 Ferdi265 changed the title wayland-server: ListeningSocket has no way to bind to a passed socket FD wayland-server: There is no way to bind to a passed socket FD Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant