apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Bannert <aa...@clove.org>
Subject Re: [PATCH] Re: apr_proc_mutex is broken
Date Wed, 20 Nov 2002 04:50:35 GMT

On Tuesday, November 19, 2002, at 12:34  PM, <rbb@rkbloom.net> wrote:

> On 19 Nov 2002, Philip Martin wrote:
>> <rbb@rkbloom.net> writes:
>>> 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.
>> Are you suggesting the application should do this, or the library?
> The app would have to do this.  The easiest way to do this, is to 
> change
> APR so that all cleanups are registered as apr_proc_mutex_destroy.  
> Then,
> the app just needs to call
>     apr_pool_cleanup_kill(pool, mutex, apr_proc_mutex_destroy);

This is silly, if you do not register any cleanups and let the app 
what it wants to do. The app can register a cleanup in a pool if they
would like that pool to control the mutex's scope.

> No new API required.  In fact, I actually consider it a VERY big bug 
> that
> apps can't currently kill the cleanup.  To the best of my knowledge, 
> this
> is the only APR sub-system where the APR developer doesn't have that 
> kind
> of control.

The cleanup function is private to the mutex implementation, it *can't*
be made public. (There are many cleanup routines -- autoconf decides 
one gets used.)


View raw message