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) ? In fact, I used some global variables in my configuration structure and in the handler the program read and write on these variables (I did that to avoid to allocate memory during the treatment of the request) But now, I'm afraid to have a big bug... For example, my global structure : typedef struct { char *liste_traducteurs; char **tab_liste_traducteurs; int nb_tab_liste_traducteurs; regex_t regNumber; struct ns2__EnMessageReq eni; struct ns2__queryResponse result; struct soap soap; general_trap_config general_trap_config; } snu_config; In the method create_snu_config, I allocate the memory : // Allocation de la mémoire pour la structure eni newcfg->eni.calling = (char *) apr_pcalloc(p, TAILLE_CHAMPS * sizeof(char)); newcfg->eni.location = (char *) apr_pcalloc(p, TAILLE_CHAMPS * sizeof(char)); newcfg->eni.called = (char *) apr_pcalloc(p, TAILLE_CHAMPS * sizeof(char)); And in the handler I read/write variables : strncpy(s_cfg->eni.calling,&buffer[iDebut],iTaille); Thanks a lot for your help ;)