[rbldnsd] Idea for cleaning up forked child when reloading parent dies

Victor Duchovni Victor.Duchovni at MorganStanley.com
Wed Apr 27 20:20:31 MSD 2005


On Wed, Apr 27, 2005 at 12:31:10PM +0400, Michael Tokarev wrote:

> Hmm.  In which situation that can happen?  I mean, why the parent should
> ever exit?  Crash?  Or just SIGTERM?
> 
> If it's the latter, and granted, I don't remember how this situation is
> handled currently, it should be easy to fix (modulo the stupid linux
> behaviour).  If it's the former.. well, yes, the problem is real.

This is based on comments in the code, either crash or SIGTERM, anything
really that makes the parent process go away.

> I wanted to avoid usage of select() if at all possible (ofcourse it is
> still here when more than single listening socket is specified).  The
> reason for that is simple: here's a vmstat output from j.ns.dsbl.org
> aka ns6-cbl.abuseat.org aka t.ns.spamhaus.org:

Sure, looping on read is less overhead than a select() loop.

> I'm thinking about using a sort of binary on-disk format like DJB's
> rbldns does, this should eliminate the need for forking altugether.

CDB seems like a natural candidate, unless performance requirements
necessitate something faster... I think that atomic update to a
database snapshot makes a lot of sense.

-- 
	Viktor.


More information about the rbldnsd mailing list