httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@lnd.com>
Subject RE: cvs commit: apache-2.0/src/os/win32 main_win32.c
Date Tue, 15 Feb 2000 21:16:20 GMT
> > Are you using
> > WaitForObjects (and therefore able to wait on a mutex)?
> apache -k restart
> > would simply signal the named mutex.
>
> Yep, that's exacty how it works.  The parent PID is part of
> the name in the
> named mutex. The preferred way to run multiple processes is
> to run them as
> services. So, an apache -k restart -n servicename should work
> to restart a
> particular service. It's broken in Apache 1.3 & 2.0. It is
> possible to run
> multiple Apache's from the command line by passing in serverroot and
> serverconf on the command line.  Keeping track of each of the
> parent PIDs in
> the registry would be difficult in this case.

Agreed, while we could create a volatile registry key, that has it's own
repercussions...

But if we are facing multiple serverconf args, why not create a
serverconf.pid file in the same folder?

Alternately, since this is dynamic, how about the following (very sketchy)
idea;

dword /* pid */ ap_query_parent(dword anypid, char *servicenamebuffer)

which resolves anypid to the main apache thread pid, and then returns the
servicename, documentroot etc... in order to match the desired thread to
manipulate.  Then for enumerating... something like...

dword /* pid */ ap_enum_apache(void **enumblock /* initially passed as
NULL*/ )
void ap_end_enum_apache(void **enumblock /* initially passed as NULL*/ )

So how do we devolve the info from the thread pool?  Any apache.exe child
resolves to an apache.exe parent.  Ergo, if the parent differs, we have a
top apache thread.  How do we handle ap_query_apache?  Add another event
along the same lines as ap##_shutdown et al.

Excuse if I've got it all upside down, I havn't begun looking at Apache's
mutex and thread handling (yet...)

Just food for thought

Bill


Mime
View raw message