httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@locus.apache.org
Subject cvs commit: httpd-2.0/modules/generators mod_cgid.c
Date Wed, 13 Dec 2000 13:30:40 GMT
trawick     00/12/13 05:30:40

  Modified:    .        CHANGES
               modules/generators mod_cgid.c
  Log:
  Straighten up the first-time-through check in mod_cgid and add a CHANGES
  entry for the bug fixes to mod_rewrite and mod_cgid.
  
  Revision  Changes    Path
  1.6       +6 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- CHANGES	2000/12/12 22:22:22	1.5
  +++ CHANGES	2000/12/13 13:30:39	1.6
  @@ -1,5 +1,11 @@
   Changes with Apache 2.0b1
   
  +  *) Get mod_cgid and mod_rewrite to work as DSOs by changing the way
  +     they keep track of whether or not their  post config hook has been
  +     called before.  Instead of a static variable (which is replaced when 
  +     the DSO is loaded a second time), use userdata in the process pool.
  +     [Jeff Trawick]
  +
   Changes with Apache 2.0a9
   
     *) Win32 now requires perl to complete the final install step for users
  
  
  
  1.54      +10 -6     httpd-2.0/modules/generators/mod_cgid.c
  
  Index: mod_cgid.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/generators/mod_cgid.c,v
  retrieving revision 1.53
  retrieving revision 1.54
  diff -u -r1.53 -r1.54
  --- mod_cgid.c	2000/12/13 04:03:19	1.53
  +++ mod_cgid.c	2000/12/13 13:30:40	1.54
  @@ -515,9 +515,17 @@
       pid_t pid; 
       apr_proc_t *procnew;
       void *data;
  +    int first_time = 0;
  +    const char *userdata_key = "cgid_init";
   
  -    apr_get_userdata(&data, "cgid_init", main_server->process->pool);
  -    if (data != NULL) {
  +    apr_get_userdata(&data, userdata_key, main_server->process->pool);
  +    if (!data) {
  +        first_time = 1;
  +        apr_set_userdata((const void *)1, userdata_key,
  +                         apr_null_cleanup, main_server->process->pool);
  +    }
  +
  +    if (!first_time) {
           apr_create_pool(&pcgi, p); 
   
           if ((pid = fork()) < 0) {
  @@ -535,10 +543,6 @@
   #if APR_HAS_OTHER_CHILD
           apr_register_other_child(procnew, cgid_maint, NULL, NULL, p);
   #endif
  -    }
  -    else {
  -        apr_set_userdata((const void *)1, "cgid_init", apr_null_cleanup,
  -                         main_server->process->pool);
       }
   } 
   
  
  
  

Mime
View raw message