Thanks Torsten,

Yes, I know I should be expected 2 calls. I followed the script in the link you gave me, and the result is quite interesting. When I start the Apache service, I get:
1
2
1
2

I know I should be expecting just
1
2
But the fact is I've got all 4 of them. See what happens when I go a graceful:
3
1
2

Why 3 appears before 1 and 2 is beyond me. Is it called the the Apache kill?

Torsten Foertsch wrote:

On Wednesday 15 June 2005 07:08, Foo Ji-Haw wrote:
Hi guys,

I'm thinking of having Apache+modperl (not much modperl used) start up
services when Apache starts up. I did a simple test with PerlRequire and
I notice that at startup, the script is run 3 times. But I can possibly
start the same service (or run 3 instances of the service as some of
them are command-line programs) 3 times. I tried to flock a file as a
control measure, but it seems that in Windows/ ActivePerl, flock() does
not really work. I also tried another dirty trick, which is to check for
presence of a dummy lock file. If the file is present, then skip the
service startup. Also did not work.

I am out of ideas. Any one did this before?

Have a look at http://perl.apache.org/docs/2.0/api/Apache2/ServerUtil.html#C_restart_count_

I don't know why your script runs thrice. Twice is is normal.

Torsten

Reply via email to