Reposting to the list on gozer's behalf who forgets to hit Reply-All once in a while :)
Stas Bekman wrote: > This patch returns the functionality we had in mp1: > > use Apache::ServerUtil (); > my $cnt = Apache->server->start_cnt(); > open my $fh, ">>/tmp/out" or die "$!"; > print $fh "cnt: $cnt\n"; > close $fh;
Interestingly simpler idea. But isn't this what ap_my_generation is more or less representing ?
Not quite. Look for example at server/mpm/prefork/prefork.c - it ++ the generation only in multiple server mode. Besides there is no API to get this ap_my_generation global. It also doesn't behave the same way (numbers wise). Also other modules haven't used it to figure out where they are just booted (e.g. post_config in mod_rewrite.c). A year ago I've proposed an httpd API to handle that centrally, but alas that didn't get anywhere :(
> but I'm not sure at all if we want to keep those $Starting/$Restarting > vars, based on previous discussions on httpd-dev those could be totally > wrong since httpd.conf is reparsed too many times (including graceful > and shutdown).
Yeah, I think $Starting/$Restarting was _way_ to esoteric.
> So i was thinking to just give a variable which will return the > generation. So start_cnt() returns 1 when server starts, and 2 when it > immediately restarts.
Yes, but I'd call it generation or something like that.
Good idea.
> please post comments since I want to integrate it now. I need it at > least for the tests.
+1 on the concept, maybe stick $Starting/$Restarting in Apache::compat ?
That might be tricky. Since it'll require to make those TIE'd variables. Otherwise how would they be updated. Or may be just assigning those at Apache::compat compile time will just work. Since one needs to load the module before using those vars.
-- __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
