httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sorin Manolache" <>
Subject Re: Apache modification questions
Date Fri, 05 Sep 2008 09:28:59 GMT
On Fri, Sep 5, 2008 at 11:19, Andrej van der Zee
<> wrote:
> Hi,
> Thanks for your comments.
>> child_init is not the appropriate hook for your purpose. Use
>> ap_hook_fixups for getting the ID and ap_hook_log_transaction for
>> logging.
> In ap_hook_fixups, is it possible to get the thread/process ID of the
> CGI application serving the request? Moreover, is this thread/process
> already created? Or maybe the hook function is executed in the same
> thread/process as the CGI application?

A CGI script is run by the code of a module, mod_perl, mod_php5, etc.
In their register_hooks function they register their handler, which is
a script interpreter basically. The handler callback is invoked in the
same thread that did the rest of the request processing (URL parsing,
authentication, fixups, etc). However, I don't know if the handler
callback (of mod_perl, mod_php5, etc), which can be seen as a sort of
third-party black box, spawns new processes/threads in which they
parse the script, compile, etc. I guess they do not spawn new
threads/processes but you have to read their docs or their sources in
order to be sure. If they do not spawn new threads/processes, then the
CGI is executed in the same thread as fixups and the rest of the
request processing.


View raw message