From: dgaudet Date: Fri, 27 Jun 1997 02:28:56 +0000 (+0000) Subject: give me useless text not useless errno X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=527e3d63690fab7c3fa1b8c92236fe2fa3b03681;p=thirdparty%2Fapache%2Fhttpd.git give me useless text not useless errno Reviewed by: Dean, Alexei Submitted by: Marc Obtained from: git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3@78389 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/APACHE_1_2_X/src/CHANGES b/APACHE_1_2_X/src/CHANGES index 354a49365ba..f8dbd06bbb5 100644 --- a/APACHE_1_2_X/src/CHANGES +++ b/APACHE_1_2_X/src/CHANGES @@ -1,4 +1,6 @@ Changes with Apache 1.2.1 + + *) Improved unix error response logging. [Marc Slemko] *) Update mod_rewrite from 3.0.5 to 3.0.6. New ruleflag QSA=query_string_append. Also fixed a nasty bug in per-dir context: diff --git a/APACHE_1_2_X/src/main/util_script.c b/APACHE_1_2_X/src/main/util_script.c index 12e57b44d1f..3fcd3a66cd2 100644 --- a/APACHE_1_2_X/src/main/util_script.c +++ b/APACHE_1_2_X/src/main/util_script.c @@ -502,7 +502,10 @@ void call_exec (request_rec *r, char *argv0, char **env, int shellcmd) program = fopen (r->filename, "r"); if (!program) { char err_string[HUGE_STRING_LEN]; - ap_snprintf(err_string, sizeof(err_string), "open of %s failed, errno is %d\n", r->filename, errno); + ap_snprintf(err_string, sizeof(err_string), + "open of %s failed, reason: fopen: %s (errno = %d)\n", + r->filename, strerror(errno), errno); + /* write(2, err_string, strlen(err_string)); */ /* exit(0); */ log_unixerr("fopen", NULL, err_string, r->server); diff --git a/APACHE_1_2_X/src/modules/standard/mod_cgi.c b/APACHE_1_2_X/src/modules/standard/mod_cgi.c index ceed899ad7b..37f2c0292cd 100644 --- a/APACHE_1_2_X/src/modules/standard/mod_cgi.c +++ b/APACHE_1_2_X/src/modules/standard/mod_cgi.c @@ -333,7 +333,8 @@ void cgi_child (void *child_stuff) */ ap_snprintf(err_string, sizeof(err_string), - "exec of %s failed, errno is %d\n", r->filename, errno); + "exec of %s failed, reason: %s (errno = %d)\n", + r->filename, strerror(errno), errno); write(2, err_string, strlen(err_string)); exit(0); } diff --git a/APACHE_1_2_X/src/modules/standard/mod_include.c b/APACHE_1_2_X/src/modules/standard/mod_include.c index 66403979383..45157eff43c 100644 --- a/APACHE_1_2_X/src/modules/standard/mod_include.c +++ b/APACHE_1_2_X/src/modules/standard/mod_include.c @@ -646,8 +646,8 @@ void include_cmd_child (void *arg) fprintf (dbg, "Exec failed\n"); #endif ap_snprintf(err_string, sizeof(err_string), - "httpd: exec of %s failed, errno is %d\n", - SHELL_PATH,errno); + "httpd: exec of %s failed, reason: %s (errno = %d)\n", + SHELL_PATH, strerror(errno), errno); write (2, err_string, strlen(err_string)); exit(0); }