apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <...@rkbloom.net>
Subject Re: [PATCH] Re: apr_proc_mutex is broken
Date Tue, 19 Nov 2002 18:46:31 GMT


On 19 Nov 2002, Jeff Trawick wrote:

> Philip Martin <philip@codematters.co.uk> writes:
>
> > Jeff Trawick <trawick@attglobal.net> writes:
> >
> > > > > Huh?  I don't understand this.  The child process still destroys
the
> > > > > semaphore.
> > > >
> > > > What code is causing the child process to destroy the semaphore?  That
> > > > isn't happening for me.  Only the parent is doing the semctl(IPC_RMID)
> > > > with my patch.
> > >
> > > add "on my system" at the end of the last sentence...
> >
> > Oops, my mistake, I failed to apply the complete patch.  It works here
> > too.
> >
> > I find disallowing apr_terminate an ugly solution :-(  I suppose it's
> > valid for the testsuite problem, but it doesn't look good for
> > applications in general.
>
> Yeah, this apparent restriction on apr_terminate()/pool cleanup is
> unexpected and ugly.

It is also a very bad idea.  :-)  Remember that apr_terminate/pool cleanup
is also going to perform other operations that are essential to properly
cleaning up the child process.

If you don't want the child process to destroy the mutex, then you should
kill that cleanup in the child process.  That is why we have the
apr_pool_cleanup_kill API.

Ryan


Mime
View raw message