perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Foo Ji-Haw" <>
Subject Re: restart_count() on Win32
Date Wed, 18 Jan 2006 04:50:41 GMT
Hello Randy,

Do let me know if I am on the right track.

The Windows implementation of Apache2 uses a 2 processes. The worker process
creates the threads upon start/restart. This differs from Unix
implementations where it forks process instead of threads.

In Unix, the main process running modperl loads up the Perl modules, then
forks. In Windows, the worker process (not the supervisor process) loads up
modperl, then creates the threads.

If I am right so far, I still don't understand William's explanation of the
parent process and child process loading up the Perl modules. Does the
supervisor process need to load up modperl as well, thereby giving the
1,2,1,2 result (for restart_count() ) in my test?

Also, how does it generate the 3,1,2 in my server restart test (I have
quoted the codes below)? Does this mean that in a restart, the supervisor
process reloads modperl, then creates the worker process, which loads up and
restarts once?

Let me know if I don't make any sense...thanks.

----- Original Message ----- 
From: "Randy Kobes" <>
To: "Foo Ji-Haw" <>
Cc: "William A. Rowe, Jr." <>; <>
Sent: Wednesday, January 18, 2006 11:56 AM
Subject: Re: restart_count() on Win32

> On Wed, 18 Jan 2006, Foo Ji-Haw wrote:
> > Hello William,
> >
> > Thanks for the insight into the inner workings of mp2 on Win32. I'd like
> > read up more on the parent-child setup, and digging through
> > (mostly in I don't seem to be able to
> > any information on mp2 on Win32.
> >
> > Can you share your source of information on this issue? Thanks.
> You may want to check out
> for a basic discussion.
> -- 
> best regards,
> randy kobes

Quote from my ealier mail:
In my httpd.conf:
PerlModule startup

package startup;
use strict;
use warnings;

open OUTFILE,'>debug.log';
print OUTFILE Apache2::ServerUtil::restart_count()."\n";
close OUTFILE;


The log file shows this when Apache starts:

And the log file shows this when Apache restarts:

View raw message