[PATCH 2/5] wayland-server: Add code docs for new display socket API's
Bryce Harrington
bryce at osg.samsung.com
Mon Nov 23 19:43:16 PST 2015
On Thu, Nov 19, 2015 at 11:21:04AM -0800, Bill Spitzak wrote:
> Also (on the patch) it looks like if there is an error it destroys the
> wl_socket object, could this do the wrong thing if the fd was supplied from
> outside?
So like if the socket object couldn't be initted or added to the display
for some reason, it will call wl_socket_destroy() on the socket, which
will close the file descriptor and the fd lock. So I guess this
question basically boils down to is it allowed for the client to close
the file descriptor it was given?
I'll defer to Sangjin on that but I should imagine that the client is
being given a unique file descriptor to use as it sees fit, including
closing it. Even without errors, Wayland will eventually call
wl_socket_destroy at program exit, so the fd is destined to be closed
one way or another.
Bryce
More information about the wayland-devel
mailing list