On Fri, 4 Apr 2008 09:04:50 +0200 Thib <[EMAIL PROTECTED]> wrote: > Hi, > > I'm developping an Apache Module, and I ask me a question about the > execution of the handler. > > Do you know if the handler is executed in mutex (mutual exclusion) ?
It isn't. > In the method create_snu_config, I allocate the memory : Anything created there should be treated as read-only at request processing time. If you need to change that, you can create a mutex, but even then you're in danger of leaking memory, by causing the child process to make its own copy of a global pool. > And in the handler I read/write variables : > > strncpy(s_cfg->eni.calling,&buffer[iDebut],iTaille); Actually you can do that with a mutex, since you're not allocating anything new from the config pool. But I wouldn't recommend it. Use a local variable. If you need request-local variables to be available over multiple hooks/callbacks, use the request config. -- Nick Kew Application Development with Apache - the Apache Modules Book http://www.apachetutor.org/
