On Tuesday, November 19, 2002, at 12:34 PM, <[EMAIL PROTECTED]> wrote:


On 19 Nov 2002, Philip Martin wrote:

<[EMAIL PROTECTED]> 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 decide
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 which
one gets used.)


-aaron



Reply via email to