From: Justin Erenkrantz Date: Mon, 18 Feb 2002 06:15:38 +0000 (+0000) Subject: Fixup DEBUG_CGI code paths to compile and not leak fds. X-Git-Tag: 2.0.33~211 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1b1337e4df6bf5c2047908057a1dc26df43f62b8;p=apache Fixup DEBUG_CGI code paths to compile and not leak fds. PR: 9670, 9671 Submitted by: David MacKenzie Reviewed by: Justin Erenkrantz git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93474 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 8e9877346f..7e05c7f321 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,8 @@ Changes with Apache 2.0.33-dev + *) Fix DEBUG_CGI support in mod_cgi. PR 9670, 9671. + [David MacKenzie ] + *) Fix incorrect check for script_in in mod_cgi. PR 9669. [David MacKenzie ] diff --git a/modules/generators/mod_cgi.c b/modules/generators/mod_cgi.c index cd7bb9930d..f29cf87cd7 100644 --- a/modules/generators/mod_cgi.c +++ b/modules/generators/mod_cgi.c @@ -402,8 +402,8 @@ static apr_status_t run_cgi_child(apr_file_t **script_out, RAISE_SIGSTOP(CGI_CHILD); #ifdef DEBUG_CGI - fprintf(dbg, "Attempting to exec %s as %sCGI child (argv0 = %s)\n", - r->filename, cld->nph ? "NPH " : "", argv0); + fprintf(dbg, "Attempting to exec %s as CGI child (argv0 = %s)\n", + r->filename, argv[0]); #endif if (e_info->prog_type == RUN_AS_CGI) { @@ -482,6 +482,9 @@ static apr_status_t run_cgi_child(apr_file_t **script_out, } } } +#ifdef DEBUG_CGI + fclose(dbg); +#endif return (rc); }