]> granicus.if.org Git - apache/commitdiff
Fix a restart problem when cgid is used. Code in the parent
authorJeff Trawick <trawick@apache.org>
Thu, 9 Aug 2001 15:10:58 +0000 (15:10 +0000)
committerJeff Trawick <trawick@apache.org>
Thu, 9 Aug 2001 15:10:58 +0000 (15:10 +0000)
httpd process was trying to clear a pool which is now only
initialized in the child.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90048 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/generators/mod_cgid.c

diff --git a/CHANGES b/CHANGES
index 046de0f472c8843a16770b84e59a27d06f269dd7..96fe75ed9898b187938be7def8b76ecace621cf8 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,9 @@
 Changes with Apache 2.0.24-dev
 
+  *) Fix a restart problem when cgid is used.  Code in the parent
+     httpd process was trying to clear a pool which is now only 
+     initialized in the child.  [Greg Ames, Jeff Trawick]
+     
 Changes with Apache 2.0.23
 
   *) Use the prefork MPM by default on Unix.  [various]
index f77bc13cd8ff47434d0112f671d55f45d59742a3..26946a9657388e2fc1cd20509d26b76f9a01874c 100644 (file)
@@ -230,13 +230,18 @@ static char **create_argv(apr_pool_t *p, char *path, char *user, char *group,
 static void cgid_maint(int reason, void *data, apr_wait_t status)
 {
     pid_t *sd = data;
+
     switch (reason) {
         case APR_OC_REASON_DEATH:
+            /* don't do anything; server is stopping or restarting */
+            break;
         case APR_OC_REASON_LOST:
-            /* stop gap to make sure everything else works.  In the end,
-             * we'll just restart the cgid server. */
-            apr_pool_destroy(pcgi);
-            kill(getpid(), SIGWINCH); /* yes, to ourself */
+            /* it would be better to restart just the cgid child
+             * process but for now we'll gracefully restart the entire 
+             * server by sending SIGWINCH to ourself, the httpd parent
+             * process
+             */
+            kill(getpid(), SIGWINCH);
             break;
         case APR_OC_REASON_RESTART:
             apr_proc_other_child_unregister(data);