Commit f4f47812 authored by Jeff Trawick's avatar Jeff Trawick
Browse files

Straighten up the first-time-through check in mod_cgid and add a CHANGES

entry for the bug fixes to mod_rewrite and mod_cgid.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87330 13f79535-47bb-0310-9956-ffa450edef68
parent 2d50d1a8
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
Changes with Apache 2.0b1

  *) Get mod_cgid and mod_rewrite to work as DSOs by changing the way
     they keep track of whether or not their  post config hook has been
     called before.  Instead of a static variable (which is replaced when 
     the DSO is loaded a second time), use userdata in the process pool.
     [Jeff Trawick]

Changes with Apache 2.0a9

  *) Win32 now requires perl to complete the final install step for users
+10 −6
Original line number Diff line number Diff line
@@ -515,9 +515,17 @@ static void cgid_init(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp,
    pid_t pid; 
    apr_proc_t *procnew;
    void *data;
    int first_time = 0;
    const char *userdata_key = "cgid_init";

    apr_get_userdata(&data, "cgid_init", main_server->process->pool);
    if (data != NULL) {
    apr_get_userdata(&data, userdata_key, main_server->process->pool);
    if (!data) {
        first_time = 1;
        apr_set_userdata((const void *)1, userdata_key,
                         apr_null_cleanup, main_server->process->pool);
    }

    if (!first_time) {
        apr_create_pool(&pcgi, p); 

        if ((pid = fork()) < 0) {
@@ -536,10 +544,6 @@ static void cgid_init(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp,
        apr_register_other_child(procnew, cgid_maint, NULL, NULL, p);
#endif
    }
    else {
        apr_set_userdata((const void *)1, "cgid_init", apr_null_cleanup,
                         main_server->process->pool);
    }
} 

static void *create_cgid_config(apr_pool_t *p, server_rec *s)