On Friday 13 October 2006 17:10, Roland Genske wrote:
> Hello all,
>
> is it possible for a module to detect at runtime whether it runs in
> a "prefork" server or in a "worker" (threaded) server? Our module
> must behave differently depending on this.
You already got the straight answer.
There's an alternative that might be worth looking at, depending on
what your module does that prompts the question. You can also use
APR definitions
#if APR_HAS_THREADS
... do thready things ...
#else
... do non-thready things ...
#endif
This will give different results to ap_mpm_query, as Prefork can
be built on a threaded APR.
--
Nick Kew
Application Development with Apache - the Apache Modules Book
http://www.prenhallprofessional.com/title/0132409674