On Mon, 27 Oct 2014 09:55:46 +0100
Marek Chalupa wrote:
> Hi,
>
> at first glance I didn't like returning fd from wl_connection_destroy, but
> at the other, I did!
> If you think about the connection as a buffer for the fd (and that is
> really the case),
> then it make sense to do something lik
Hi,
at first glance I didn't like returning fd from wl_connection_destroy, but
at the other, I did!
If you think about the connection as a buffer for the fd (and that is
really the case),
then it make sense to do something like:
create conn -- destroy conn
fd --
Calling close() on the same file descriptor that a previous call to
close() already closed is wrong, and racy if another thread received
that same file descriptor as a eg. new socket or actual file.
There are two situations where wl_connection_destroy() would close its
file descriptor and then ano