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

Attachment: pgpDtvAH9LekF.pgp
Description: PGP signature

Reply via email to