perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <>
Subject [mp2] END blocks are now inherited on fork
Date Sun, 06 Jun 2004 08:45:08 GMT
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     mod_perl Guide --->

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message