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" <[EMAIL PROTECTED]> To: "Foo Ji-Haw" <[EMAIL PROTECTED]> Cc: "William A. Rowe, Jr." <[EMAIL PROTECTED]>; <modperl@perl.apache.org> 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 to > > read up more on the parent-child setup, and digging through perl.apache.org > > (mostly in http://perl.apache.org/docs/2.0/) I don't seem to be able to get > > any information on mp2 on Win32. > > > > Can you share your source of information on this issue? Thanks. > > You may want to check out > http://f-m-c.org/projects/apache/html/4_3Multitasking_server.html > for a basic discussion. > > -- > best regards, > randy kobes > Quote from my ealier mail: In my httpd.conf: PerlModule startup in startup.pm: package startup; use strict; use warnings; BEGIN { open OUTFILE,'>debug.log'; print OUTFILE Apache2::ServerUtil::restart_count()."\n"; close OUTFILE; } 1; The log file shows this when Apache starts: 1 2 1 2 And the log file shows this when Apache restarts: 3 1 2