From: Jeff Trawick Date: Thu, 9 Aug 2001 15:10:58 +0000 (+0000) Subject: Fix a restart problem when cgid is used. Code in the parent X-Git-Tag: 2.0.24~136 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=38f2790116926c53280481682ef7a2c5ac1a6101;p=apache 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. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90048 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 046de0f472..96fe75ed98 100644 --- 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] diff --git a/modules/generators/mod_cgid.c b/modules/generators/mod_cgid.c index f77bc13cd8..26946a9657 100644 --- a/modules/generators/mod_cgid.c +++ b/modules/generators/mod_cgid.c @@ -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);