Hello guys,
I've asked this before, but I hope to follow through on the suggestions
contributed by you guys.
You know that Apache2 restarts itself, so a PerlRequire or a
PerlPostConfigRequire will be run more than once. A friendly mailing
list reader suggests using Apache2::ServerUtil::restart_count(). Good
idea. But in the Windows environment, I get:
1
2
1
2
if I use the following script:
open (OUTFILE,'>>debug.txt');
print OUTFILE Apache2::ServerUtil::restart_count()."\n";
close OUTFILE;
This seems to suggest the following:
1. The script is run 4 times instead of 2 (!!!)
2. There are two independent interpreters at work, hence the revert back
to 1 on the third line.
My sneaky plan is to have the startup script start off an independent
single-threaded process (if this is possible). Perhaps something like a
scheduler. A singleton. Obviously I cannot simply put it as-is in the
PerlRequire script, since that will shoot off 4 schedulers. Also, a
restart might mess things up.
Has anyone done this before? Appreciate your ideas!