You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Doug MacEachern <do...@covalent.net> on 2001/08/05 00:01:58 UTC
mod_cgid leaks on restarts
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);
}
Re: mod_cgid leaks on restarts
Posted by Ryan Bloom <rb...@covalent.net>.
+1
Ryan
On Saturday 04 August 2001 15:01, Doug MacEachern wrote:
> 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);
> }
--
_____________________________________________________________________________
Ryan Bloom rbb@apache.org
Covalent Technologies rbb@covalent.net
-----------------------------------------------------------------------------