httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug MacEachern <do...@covalent.net>
Subject mod_cgid leaks on restarts
Date Sat, 04 Aug 2001 22:01:58 GMT
the pcgi pool appears to be the culprit.  it is only used for the forked
child, moving the apr_pool_create(&pcgi, p) to happen in the child gets
rid of the leakage on restart.  i don't understand why, it looks like pcgi
is properly destroyed in the parent.

Index: modules/generators/mod_cgid.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/generators/mod_cgid.c,v
retrieving revision 1.88
diff -u -r1.88 mod_cgid.c
--- modules/generators/mod_cgid.c	2001/07/30 16:18:05	1.88
+++ modules/generators/mod_cgid.c	2001/08/04 21:45:29
@@ -602,8 +602,6 @@
     }
 
     if (!first_time) {
-        apr_pool_create(&pcgi, p); 
-
         total_modules = 0;
         for (m = ap_preloaded_modules; *m != NULL; m++)
             total_modules++;
@@ -614,6 +612,7 @@
                          "Couldn't spawn cgid daemon process"); 
         }
         else if (pid == 0) {
+            apr_pool_create(&pcgi, p); 
             cgid_server(main_server);
             exit(-1);
         } 


Mime
View raw message