Commit 2445d7b9 authored by Jeff Trawick's avatar Jeff Trawick
Browse files

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
parent f5c38d42
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
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]
+9 −4
Original line number Diff line number Diff line
@@ -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);