bind9 doesn't close extra fds

James Ralston qralston+ml.bind-workers at andrew.cmu.edu
Wed Sep 4 04:24:35 UTC 2002


On Tue, 3 Sep 2002, Greg A. Woods wrote:

> [ On Tuesday, September 3, 2002 at 09:13:51 (-0400), Rudolph T
> Maceyko wrote: ]
> 
> > --On Tuesday, August 27, 2002 18:25:41 +0000 Paul Vixie
> > <paul at vix.com> wrote:
> > 
> > > > > bind8 loops for over a minute on modern hardware for which
> > > > > _SC_OPEN_MAX is often 16777216.
> > 
> > > we could keep closing until fd>_SC_OPEN_MAX or the number of
> > > failed closes due to EBADF exceeded some threshold (42 being my
> > > favourite.)
> > 
> > This situation doesn't appeal to me very much...  Either close
> > them all, or close none.  Who's to say that the offending
> > filedescriptors are "low" ones?
> 
> I would say to only close 0, 1, and 2 on systems without a proper
> daemon(3) function and otherwise let it do what the system
> implementers fell is "correct" (and to make exceptions only for
> those systems where daemon(3) is found to be borken).

That would be "all of them".

(Meaning, I've never seen a daemon() function that properly closes all
inherited file descriptors.)

-- 
James Ralston, Information Technology
Software Engineering Institute
Carnegie Mellon University, Pittsburgh, PA, USA



More information about the bind-workers mailing list