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: Platform Specific MPM Design Questions
Date Thu, 25 May 2000 01:08:02 GMT
> From: Tim Costello [mailto:timcostello@ozemail.com.au]
> Sent: Wednesday, May 24, 2000 1:57 PM
> 
> On Wednesday, 24 May 2000, William A. Rowe, Jr. wrote:
> >   http_main.c     main() calls
> >     mod_mpm_winnt   ap_hook_args() calls
> >       kernel32        StartService() calls
> >         mod_mpm_hookservice() which will set up a vector to 
> return back into
> >                               the return vector of the 
> ap_hook_args() call so
> >                               we resume execution exactly 
> where we left off.
> 
> Aaaaah. I'm starting to see what you're getting at. You want 
> http_main to
> contain the real main, and to do away with main_win32.c. 
> Then, have the mpm 
> do stuff, call the scm, then return to the end of the mpm, so 
> main's always 
> at the top of the call stack (instead of service_main). Right?

Exactly... setjmp prior to calling our start service function
and a longjmp back out of the service's main thunk should work
out just fine :-)

> I figure the phony ServiceMain is okay because it's unlikely 
> that multiple 
> (different) services will share apache's executable.

The only problem is that the service main can't return, or the
SCM determines that the service terminated (outch!)

> I know this doesn't touch your problem of getting at the 
> command-line - but 
> it's another option that retains the flow of execution (and 
> the values of 
> main's local variables). It also might spark something better 
> in someone 
> else's head. 

I think we might have it... news at 10

> Tim
> 
> This message was sent through MyMail http://www.mymail.com.au
> 
> 

Mime
View raw message