Java Mailing List Archive

http://www.apache-httpd.com/

Home » modperl.perl »

code in <perl> sections executed twice in same process?

E R

2009-11-16

Replies: Find Java Web Hosting

Author LoginPost Reply
Hi -

I am using mod-perl 1.3.41 with perl 5.8.9.

The only perl I have in my config file is:

<Perl>
warn "This is a <perl> section in process $$ at time @{[time]}\n";
sleep(5);
warn "Done sleeping\n";
</Perl>

When I start it up in single process mode (-X), I'll something like
this on stderr (to the console):

This is a <perl> section in process 25597 at time 1258408992
Done sleeping

And also in the error log I'll see:

This is a <perl> section in process 25597 at time 1258408998
Done sleeping

The pids will be the same, but the times will be different (about 5
secs. apart.)

Is this "normal", and what can I do so that the code in <Perl>
sections is only executed once in the parent process?

Thanks,
ER
©2008 apache-httpd.com - Jax Systems, LLC, U.S.A.