[PATCH 2/5] wayland-server: Add code docs for new display socket API's

Bill Spitzak spitzak at gmail.com
Wed Nov 25 17:35:55 PST 2015


On Mon, Nov 23, 2015 at 7:54 PM, 이상진 <lsj119 at samsung.com> 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?
>
If wayland is going to call wl_socket_destroy() eventually on success, then
I think it is correct that it call it on errors too, so I agree the code is
correct as-is.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20151125/0f611104/attachment.html>


More information about the wayland-devel mailing list