httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sander Temme <>
Subject Re: process initialisation in prefork-MPM
Date Tue, 23 Dec 2008 00:13:03 GMT

On Dec 22, 2008, at 4:48 AM, Sorin Manolache wrote:

> You hook child_init (ap_hook_child_init) and store your data in global
> variables that are accessed by post_read_request and log_transaction.

Global variables are fine if your module will never run multithreaded,  
or you won't write to the data structures from any potentially  
threaded situation.

If you want to be able to run multithreaded, you can mutex access to  
the globals.  If you want to decide at runtime, you can find out if  
you're threaded using ap_mpm_query().


Sander Temme
PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF

View raw message