httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@locus.apache.org
Subject cvs commit: apache-2.0/src/modules/standard mod_cgid.c
Date Fri, 28 Jul 2000 18:15:27 GMT
trawick     00/07/28 11:15:23

  Modified:    src      CHANGES
               src/modules/standard mod_cgid.c
  Log:
  Use ap_note_subprocess() to register the mod_cgid daemon process for cleanup
  so that it is killed at termination if it does not die when the parent gets
  SIGTERM.  This change is to fix occasional problems where the process stays
  around.
  
  Revision  Changes    Path
  1.182     +5 -0      apache-2.0/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/CHANGES,v
  retrieving revision 1.181
  retrieving revision 1.182
  diff -u -r1.181 -r1.182
  --- CHANGES	2000/07/26 18:43:56	1.181
  +++ CHANGES	2000/07/28 18:15:16	1.182
  @@ -1,4 +1,9 @@
   Changes with Apache 2.0a5
  +  *) Register the mod_cgid daemon process for cleanup so that it is
  +     killed at termination if it does not die when the parent gets
  +     SIGTERM.  This change is to fix occasional problems where the
  +     process stays around.  [Jeff Trawick]
  +
     *) Fix a bug in the time handling.  Basically, we were imploding a time
        in ap_parseHTTPdate, but it had bogus data in the exploded time format.
        Namely, tm_usec and tm_gmtoff were not filled out.  ap_implode_time
  
  
  
  1.30      +6 -4      apache-2.0/src/modules/standard/mod_cgid.c
  
  Index: mod_cgid.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_cgid.c,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- mod_cgid.c	2000/07/21 19:50:53	1.29
  +++ mod_cgid.c	2000/07/28 18:15:21	1.30
  @@ -601,7 +601,7 @@
   static void cgid_init(ap_pool_t *p, ap_pool_t *plog, ap_pool_t *ptemp, server_rec *main_server)

   { 
       pid_t pid; 
  -    ap_proc_t ap_pid;
  +    ap_proc_t *procnew;
   
       if (once_through > 0) { 
           ap_create_pool(&pcgi, p); 
  @@ -614,10 +614,12 @@
               cgid_server(main_server);
               exit(-1);
           } 
  +        procnew = ap_pcalloc(p, sizeof(*procnew));        
  +        procnew->pid = pid;
  +        procnew->err = procnew->in = procnew->out = NULL;
  +        ap_note_subprocess(p, procnew, kill_after_timeout);
   #if APR_HAS_OTHER_CHILD
  -        ap_pid.pid = pid;
  -        ap_pid.err = ap_pid.in = ap_pid.out = NULL;
  -        ap_register_other_child(&ap_pid, cgid_maint, NULL, NULL, p);
  +        ap_register_other_child(procnew, cgid_maint, NULL, NULL, p);
   #endif
       } 
       else once_through++; 
  
  
  

Mime
View raw message