Torsten Foertsch пишет: > On Monday 05 March 2007 12:42, Sergey Borodich wrote: >> I need some technique what work as >> PerlRequire (or PerlPostConfigHandler) >> at apache start (it run only once) >> >> but I need similar technique for stop apache >> it must run if "apache stop" only once >> >> it need for cleanup shared memory before stop, etc >> >> and also desirably for mp1/mp2 both >> >> prompt something please...
thanks for answer > 1) Create an object and store it in a global variable. Then use the DESTROY > method to do what you want. That is what Perl::AtEndOfScope does. it run after each child exit :( > 2) Another way for mp2: create a cleanup handler APR::Pool::cleanup_register > for one of the global pools. Apache2::ServerRec::pool or > Apache2::Process::pool come to mind. thanks for way, I try exploring it I hope for mp1 something similar good also > 3) And what about a simple END{} block? it run after each child exit too :( I try 1,3 before I put END(DESTROY) in startup.pl and Lib.pm(loaded from startup) but result it similar - it run after each apache child exit tested on mp1(apache1) and mp2(apache2.0) -- Sergey Borodich http://bor.org.ua