Re: [PATCH] connection: Leave fd open in wl_connection_destroy

2014-11-04 Thread Pekka Paalanen
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

Re: [PATCH] connection: Leave fd open in wl_connection_destroy

2014-10-27 Thread Marek Chalupa
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 --

[PATCH] connection: Leave fd open in wl_connection_destroy

2014-09-30 Thread Benjamin Herr
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