httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <...@algroup.co.uk>
Subject Re: latest redhat rpm of apache
Date Sat, 03 Jan 1998 21:54:10 GMT
Dean Gaudet wrote:
> 
> On Fri, 2 Jan 1998, Ben Laurie wrote:
> 
> > Dean Gaudet wrote:
> > >
> > > Actually when I mailed ewt@redhat.com about the kill -9 problem he
> > > asked me if there was any way for him to know the daemon had died.
> > > I said there wasn't and was there another daemon that behaved in a way he
> > > liked 'cause I could emulate it.  He said nope, it's a general problem,
> > > a solution would be great.  So here's my proposed solution.
> > >
> > > After setting up the pid file the parent acquires a sharable lock on it.
> > > (The parent exits if the lock fails).  Each child also child acquires
> > > a sharable lock.  flock() or fcntl() will work for this.
> > >
> > > A support utility "waitlock filename timeout" attempts to acquire an
> > > exclusive lock on filename.  Once it has acquired the exclusive lock
> > > it exits with code 0.  On any error it exits with code 1, on timeout it
> > > exits with code 2.
> >
> > Hang on - how is it going to ever acquire an exclusive lock? The parent
> > is still holding a shared lock! I presume you have a model along the
> > lines of:
> 
> The parent doesn't exit until after it's spent a whack of time in
> reclaim_child_processes() brutally killing off all the children.  So all
> the children have released their locks and died, then the parent releases
> its lock and dies.  Then waitlock is able to acquire an exclusive lock.

Hold on. Am I losing it completely? I though the parent didn't exit at
all?

Cheers,

Ben.

-- 
Ben Laurie            |Phone: +44 (181) 735 0686|Apache Group member
Freelance Consultant  |Fax:   +44 (181) 735 0689|http://www.apache.org
and Technical Director|Email: ben@algroup.co.uk |Apache-SSL author
A.L. Digital Ltd,     |http://www.algroup.co.uk/Apache-SSL
London, England.      |"Apache: TDG" http://www.ora.com/catalog/apache

Mime
View raw message