> > wrowe 01/07/23 15:19:13 > > > > Modified: include apr_pools.h > > include/arch/unix inherit.h > > memory/unix apr_pools.c > > Log: > > Depricated the broken apr_pool_child_cleanup_kill, and added the new > > apr_pool_child_cleanup_set() to replace the registered child cleanup > > with another cleanup fn. Fixed the inherit macro declarations to never > > register a NULL cleanup fn. > > Sorry. Here's the net, correct patch applied to apr_pools.c;
Yeah right... thank you Justin for pointing out the very, very obvious. I don't object to readding apr_pool_child_cleanup_kill(), btw, if it were named 1/2 way reasonably, such as apr_pool_cleanup_kill_by_child_cleanup(). It certainly wasn't doing what I would have expected. Anyways, Jeff, does this solve your issues? Index: apr_pools.c =================================================================== RCS file: /home/cvs/apr/memory/unix/apr_pools.c,v retrieving revision 1.101 retrieving revision 1.104 diff -u -r1.101 -r1.104 --- apr_pools.c 2001/07/14 22:31:38 1.101 +++ apr_pools.c 2001/07/23 22:51:41 1.104 @@ -738,23 +738,21 @@ } } -APR_DECLARE(void) apr_pool_child_cleanup_kill(apr_pool_t *p, const void *data, - apr_status_t (*cleanup) (void *)) +APR_DECLARE(void) apr_pool_child_cleanup_set(apr_pool_t *p, const void *data, + apr_status_t (*plain_cleanup) (void *), + apr_status_t (*child_cleanup) (void *)) { struct cleanup *c; - struct cleanup **lastp; if (p == NULL) return; c = p->cleanups; - lastp = &p->cleanups; while (c) { - if (c->data == data && c->child_cleanup == cleanup) { - *lastp = c->next; + if (c->data == data && c->plain_cleanup == plain_cleanup) { + c->child_cleanup = child_cleanup; break; } - lastp = &c->next; c = c->next; } }