summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Sato <takashi@apache.org>2009-10-10 07:52:17 +0200
committerTakashi Sato <takashi@apache.org>2009-10-10 07:52:17 +0200
commitc5e09c5987f3a34b19dc89253626338b19340ac0 (patch)
tree21dba5452a4b121ebe89fd669bc2b2eeba42bf2d
parentconfigure: Fix THREADED_MPMS so that mod_cgid is (diff)
downloadapache2-c5e09c5987f3a34b19dc89253626338b19340ac0.tar.xz
apache2-c5e09c5987f3a34b19dc89253626338b19340ac0.zip
Stop unexpected error logs in each requests.
sock_write returns not size but status. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@823797 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--modules/generators/mod_cgid.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/generators/mod_cgid.c b/modules/generators/mod_cgid.c
index 27849eebe7..a7cf2369ee 100644
--- a/modules/generators/mod_cgid.c
+++ b/modules/generators/mod_cgid.c
@@ -728,10 +728,12 @@ static int cgid_server(void *data)
if (cgid_req.req_type == GETPID_REQ) {
pid_t pid;
+ apr_status_t rv;
pid = (pid_t)((long)apr_hash_get(script_hash, &cgid_req.conn_id, sizeof(cgid_req.conn_id)));
- if (sock_write(sd2, &pid, sizeof(pid)) != sizeof(pid)) {
- ap_log_error(APLOG_MARK, APLOG_ERR, 0,
+ rv = sock_write(sd2, &pid, sizeof(pid));
+ if (rv != APR_SUCCESS) {
+ ap_log_error(APLOG_MARK, APLOG_ERR, rv,
main_server,
"Error writing pid %" APR_PID_T_FMT " to handler", pid);
}