You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Stas Bekman <st...@stason.org> on 2004/06/06 10:45:08 UTC
[mp2] END blocks are now inherited on fork
As I'm working through the tutorials docs, I find that some of the docs
weren't updated when we changed things in the core. One of those things is the
relatively recent big change on END blocks behavior. Untill now mp2 was
running END blocks compiled at the server startup only once when the parent
process shutdowns (which is what the docs said). However after the change,
children inherit the END blocks from the parent and will run them just like
fork does:
% perl -le 'END { print "this is the end $$" }; fork'
this is the end 23659
this is the end 23658
This is also how mod_perl 1 works. If someone wants to run something only once
they should register a cleanup handler on the $conf_pool or similar pool at
the server startup.
This is just a heads up. I'm updating the docs to reflect the reality at this
very moment :)
--
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org