Return-Path: Delivered-To: apmail-apache-cvs-archive@apache.org Received: (qmail 68557 invoked by uid 500); 13 Dec 2000 18:01:24 -0000 Mailing-List: contact apache-cvs-help@apache.org; run by ezmlm Precedence: bulk Reply-To: new-httpd@apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list apache-cvs@apache.org Received: (qmail 68535 invoked by uid 500); 13 Dec 2000 18:01:23 -0000 Delivered-To: apmail-apache-1.3-cvs@apache.org Date: 13 Dec 2000 18:01:23 -0000 Message-ID: <20001213180123.68524.qmail@locus.apache.org> From: wrowe@locus.apache.org To: apache-1.3-cvs@apache.org Subject: cvs commit: apache-1.3/src/modules/standard mod_cgi.c wrowe 00/12/13 10:01:22 Modified: src CHANGES src/modules/standard mod_cgi.c Log: *) mod_cgi on Win32 and Netware now does a more effective job of capturing all stderr output from user's scripts. PR6161 Submitted by: Hardy Braunsdorf Reviewed by: William Rowe Revision Changes Path 1.1606 +4 -0 apache-1.3/src/CHANGES Index: CHANGES =================================================================== RCS file: /home/cvs/apache-1.3/src/CHANGES,v retrieving revision 1.1605 retrieving revision 1.1606 diff -u -r1.1605 -r1.1606 --- CHANGES 2000/12/13 05:06:41 1.1605 +++ CHANGES 2000/12/13 18:01:19 1.1606 @@ -1,5 +1,9 @@ Changes with Apache 1.3.15 + *) mod_cgi on Win32 and Netware now does a more effective job of + capturing all stderr output from user's scripts. PR6161 + [Hardy Braunsdorf , Will Rowe] + *) mod_status now respects ?refresh=n of 1 or greater. If the given refresh value is not a number, ?refresh is set to 1 second. [William Rowe, Dirk Ahlers PR5067] 1.96 +24 -5 apache-1.3/src/modules/standard/mod_cgi.c Index: mod_cgi.c =================================================================== RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_cgi.c,v retrieving revision 1.95 retrieving revision 1.96 diff -u -r1.95 -r1.96 --- mod_cgi.c 2000/11/14 09:57:20 1.95 +++ mod_cgi.c 2000/12/13 18:01:21 1.96 @@ -529,9 +529,19 @@ while (ap_bgets(argsbuffer, HUGE_STRING_LEN, script_in) > 0) { continue; } - while (ap_bgets(argsbuffer, HUGE_STRING_LEN, script_err) > 0) { - continue; - } +#if defined(WIN32) || defined(NETWARE) + /* Soak up stderr and redirect it to the error log. + * Script output to stderr is already directed to the error log + * on Unix, thanks to the magic of fork(). + */ + while (ap_bgets(argsbuffer, HUGE_STRING_LEN, script_err) > 0) { + ap_log_rerror(APLOG_MARK, APLOG_ERR | APLOG_NOERRNO, r, + "%s", argsbuffer); + } +#else + while (ap_bgets(argsbuffer, HUGE_STRING_LEN, script_err) > 0) + continue; +#endif ap_kill_timeout(r); @@ -564,9 +574,18 @@ ap_bclose(script_in); ap_soft_timeout("soaking script stderr", r); - while (ap_bgets(argsbuffer, HUGE_STRING_LEN, script_err) > 0) { +#if defined(WIN32) || defined(NETWARE) + /* Script output to stderr is already directed to the error log + * on Unix, thanks to the magic of fork(). + */ + while (ap_bgets(argsbuffer, HUGE_STRING_LEN, script_err) > 0) { + ap_log_rerror(APLOG_MARK, APLOG_ERR | APLOG_NOERRNO, r, + "%s", argsbuffer); + } +#else + while (ap_bgets(argsbuffer, HUGE_STRING_LEN, script_err) > 0) continue; - } +#endif ap_kill_timeout(r); ap_bclose(script_err); }