tevent_loop_wait() never finishes

Volker Lendecke Volker.Lendecke at SerNet.DE
Thu Aug 1 01:27:40 MDT 2013


On Thu, Aug 01, 2013 at 09:08:58AM +0200, Stefan (metze) Metzmacher wrote:
> Ok, I looked at it more detailed and there's no fd leak
> as tevent_common_context_destructor() closes the pipe.
> 
> But as the current code never sets
> ev->pipe_fds[0] = -1; ev->pipe_fds[1] = -1;
> 
> I haad to update the patch, otherwise we'd potentially call
> close(0);

Setting the fds to -1 at startup is more safe I guess.
Otherwise we might end up calling close() on completely
unrelated fd's that have been opened somewhere else.
Unlikely, yes, but I do like those -1 checks.

I'm okay with the current patch, but we might re-spin this
in a later patch.

Volker

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de


More information about the samba-technical mailing list