Unix domain datagram based messaging

Jeremy Allison jra at samba.org
Thu Apr 10 13:02:13 MDT 2014


On Thu, Apr 10, 2014 at 08:46:58PM +0200, Volker Lendecke wrote:
> On Thu, Apr 10, 2014 at 10:05:31AM -0700, Jeremy Allison wrote:
> > In fact the only thing I can see that
> > might be an issue here is how does
> > unix_dgram_recv_handler() handle
> > a it if we get a geniune error that
> > causes recv() to return -1. Won't it
> > keep getting called ? I'll do some
> > more digging here..
> 
> Yep, that's what I thought as well. ENOMEM is one that might
> hit us like the Solaris socket problem, but there retry
> should not hurt and might be the right thing. The only thing
> I can really imagine to happen here is that someone else
> closes the socket behind our back, but then we deserve a
> 100% loop, right? :-)

Errr, well - maybe :-). Can't you have
the struct poll_watch->callback return
an int to tevent_watch_handler(), and
have it remove the fde if it comes
back with -1 ? That at least would
protect us from horrible CPU loops :-).

> New patchset pending. I'll send it once I figured out more
> of the socket and lockfile leak.

WooHoo! Looking forward to getting this
in asap !!!

Jeremy.


More information about the samba-technical mailing list