httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject cvs commit: httpd-2.0/modules/generators mod_cgid.c
Date Thu, 29 Mar 2001 00:17:50 GMT
trawick     01/03/28 16:17:50

  Modified:    .        CHANGES
               modules/generators mod_cgid.c
  Log:
  Fix a storage leak in mod_cgid... the temporary pool created for
  each request was not cleaned up.
  
  This removes the nastiest symptom of some excess pipes being created
  (i.e., we don't run out of file descriptors), though something
  additional is needed to keep from creating the pipes to begin with.
  
  Revision  Changes    Path
  1.152     +5 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.151
  retrieving revision 1.152
  diff -u -r1.151 -r1.152
  --- CHANGES	2001/03/27 19:19:07	1.151
  +++ CHANGES	2001/03/29 00:17:49	1.152
  @@ -1,4 +1,9 @@
   Changes with Apache 2.0.16-dev
  +
  +  *) Clean up mod_cgid's temporary request pool.  Besides fixing a
  +     storage leak this ensures that some unnecessary pipes are closed.
  +     [Jeff Trawick]
  +
     *) Performance: Add quick_handler hook. This hook is called at the
        very beginning of the request processing before location_walk,
        translate_name, etc.  This hook is useful for URI keyed content
  
  
  
  1.81      +5 -1      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.80
  retrieving revision 1.81
  diff -u -r1.80 -r1.81
  --- mod_cgid.c	2001/03/02 22:00:30	1.80
  +++ mod_cgid.c	2001/03/29 00:17:50	1.81
  @@ -505,7 +505,6 @@
           apr_proc_t *procnew = NULL;
           apr_file_t *inout;
   
  -
           len = sizeof(unix_addr);
           sd2 = accept(sd, (struct sockaddr *)&unix_addr, &len);
           if (sd2 < 0) {
  @@ -539,6 +538,10 @@
                                           in_pipe,
                                           out_pipe,
                                           err_pipe)) != APR_SUCCESS) ||
  +              /* XXX apr_procattr_child_*_set() is creating an unnecessary 
  +               * pipe between this process and the child being created...
  +               * It is cleaned up with the temporary pool for this request.
  +               */
                 ((rc = apr_procattr_child_err_set(procattr, r->server->error_log, NULL))
!= APR_SUCCESS) ||
                 ((rc = apr_procattr_child_in_set(procattr, inout, NULL)) != APR_SUCCESS)))
||
               ((rc = apr_procattr_child_out_set(procattr, inout, NULL)) != APR_SUCCESS) ||
  @@ -571,6 +574,7 @@
                           "couldn't create child process: %d: %s", rc, r->filename);
               }
           }
  +        apr_pool_clear(p);
       } 
       return -1; 
   } 
  
  
  

Mime
View raw message