On Tue, 05 Feb 2013 16:48:08 -0500 "Mikhail T." <mi+t...@aldan.algebra.com> wrote:
> On 05.02.2013 16:37, Nick Kew wrote: > > But in general, querying another module, or knowing anything about > > its cleanups, would be a violation of modularity. If it's > > legitimate for a module to expose its inner workings, it can do so > > by exporting an API. > > > > Why the questions? Are you writing two modules that relate closely > > to each other? > I'm not writing them -- they already exist. The two Tcl-modules > (rivet and websh) both destroy the Tcl-interpreter at exit. The > module, that gets to run the clean up last usually causes a crash: > https://issues.apache.org/bugzilla/show_bug.cgi?id=54162 What if both attempt to register an identical apr_optional_fn for tcl_destroy. That way you will never have both optional functions called. FWIW I would call that function as a destructor of the process_pool, which you can find by walking the config pool's parents.