Thank you very much for your help, Jeff. These are great suggestions. Earlier, I had taken a look at these methods, but none of them seemed to be what I really wanted.
.--- On Wed, 23 Aug 2006, [EMAIL PROTECTED] wrote: | 6.4.10 END Blocks `--- Can't really use END blocks in Mason-native components, and there doesn't seem to be a hook for the PerlChildExitHandler that's native to Mason, unless I'm mistaken. .--- | $r->register_cleanup(sub { warn "$$ does cleanup\n" }); `--- ...meanwhile, register_cleanup turns out to be per-request, and doesn't get to the root of my problem, which is that I'm saving up data in apache children that are constantly coming and going because of apache's own dynamism. .--- | If you want something to run only once in the parent process on shutdown and | restart, you can use register_cleanup( ) in startup.pl: | | warn "parent pid is $$\n"; | Apache->server->register_cleanup( | sub { warn "server cleanup in $$\n" }); | This is useful when some server-wide cleanup should be performed when the | server is stopped or restarted. `--- ...which turns out only to work if the parent process exits, but I need a way to hook into the children. Stas Bekman is absolutely amazing, though, and I have his book and I love it. On this project, though, I'm trying to do stay out of low level mod_perl territory because of module namespace issues. So far, I have done everything in a neat, modularized Mason-component-only system that's flexible and easy to maintain. Sadly, it appears that there is no way to catch this natively in Mason, so I'd have to have a PerlChildExitHandler and a ton of globals so that the exit handler could see my Apache::DBI DB handle and all the data it needs to carefully squirrel away. I may just be stuck and have to do this some other way. -- Patrick -- .------ Patrick M. Jordan ------. Random unused band name: | Systems/Network Administrator | Octomonkey `----- Antistatic Matrix -------' ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Mason-users mailing list Mason-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mason-users