Hi Ed, > > Are any of the following useful to you (even if you set a variable > > using the shutdown callback to forcibly stop the preload?) in > > Apache2::ServerUtil? > > > > # register server shutdown callback > > Apache2::ServerUtil::server_shutdown_register_cleanup(sub { > > Apache2::Const::OK }); > > > > # do something only when the server restarts > > my $cnt = Apache2::ServerUtil::restart_count(); > > do_something_once() if $cnt > 1; > > I suspect you probably mean > > > do_something_once() if $cnt == 1; > > Otherwise, you're depending upon the double start behavior, > which could > cause problems when someone decides to fix that bug.
Sorry, not a bug: That's taken directly from perldoc Apache2::ServerUtil. See the full doco and use cases at http://perl.apache.org/docs/2.0/api/Apache2/ServerUtil.html#C_restart_co unt_ Documentation on the deliberate restart: http://perl.apache.org/docs/2.0/user/handlers/server.html#Server_Life_Cy cle "Apache 2.0 starts by parsing the configuration file. After the configuration file is parsed, the PerlOpenLogsHandler handlers are executed if any. After that it's a turn of PerlPostConfigHandler handlers to be run. When the post_config phase is finished the server immediately restarts, to make sure that it can survive graceful restarts after starting to serve the clients." For further info see the above documentation sections and the 1.0 to 2.0 porting guide: http://perl.apache.org/docs/2.0/user/porting/compat.html Cheers, Andrew --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]