[EMAIL PROTECTED] wrote:
> 
> stoddard    99/10/12 07:45:59
> 
>   Modified:    src/modules/standard mod_cgi.c
>   Log:
>   Fix bug interpreting cgi_child return code. Do some clean-up.
> 
>   Revision  Changes    Path
>   1.8       +6 -16     apache-2.0/src/modules/standard/mod_cgi.c
> 
>   Index: mod_cgi.c
>   ===================================================================
>   RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_cgi.c,v
>   retrieving revision 1.7
>   retrieving revision 1.8
>   diff -u -r1.7 -r1.8
>   --- mod_cgi.c 1999/10/12 04:06:58     1.7
>   +++ mod_cgi.c 1999/10/12 14:45:57     1.8
>   @@ -295,7 +295,7 @@
>        char *argv0;
>    };
> 
>   -static int  cgi_child(struct cgi_child_stuff *child_stuff,
>   +static ap_status_t cgi_child(struct cgi_child_stuff *child_stuff,
>                          BUFF **script_out, BUFF **script_in, BUFF 
> **script_err)
>    {
>        struct cgi_child_stuff *cld = child_stuff;
>   @@ -308,7 +308,7 @@
>        ap_procattr_t *procattr;
>        ap_proc_t *procnew;
>        ap_os_proc_t fred;
>   -    int rc;
>   +    ap_status_t rc = APR_SUCCESS;
> 
>    #ifdef DEBUG_CGI
>    #ifdef OS2
>   @@ -346,11 +346,6 @@
>         * NB only ISINDEX scripts get decoded arguments.
>         */
> 
>   -#ifdef TPF
>   -    ap_unblock_alarms();
>   -
>   -    return (0);
>   -#else
>        ap_cleanup_for_exec();
> 
>        if ((ap_createprocattr_init(&procattr, child_context) != APR_SUCCESS) 
> ||
>   @@ -363,9 +358,7 @@
>            /* Something bad happened, tell the world. */
>         ap_log_rerror(APLOG_MARK, APLOG_ERR, r,
>                       "couldn't create child process: %s", r->filename);
>   -        ap_unblock_alarms();
>   -
>   -        return (-1);
>   +        rc = !APR_SUCCESS;

Errr, what? If the thing fails, you are supposed to return the error!

Cheers,

Ben.

--
http://www.apache-ssl.org/ben.html

"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
     - Indira Gandhi

Reply via email to