]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
merge this from 2.0.47:
authorJeff Trawick <trawick@apache.org>
Mon, 23 Jun 2003 12:28:25 +0000 (12:28 +0000)
committerJeff Trawick <trawick@apache.org>
Mon, 23 Jun 2003 12:28:25 +0000 (12:28 +0000)
    * mod_cgid: Eliminate a double-close of a socket.  This resolves
      various operational problems in a threaded MPM, since on the
      second attempt to close the socket, the same descriptor was
      often already in use by another thread for another purpose.

reviewed by: brianp, stoddard

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/APACHE_2_0_BRANCH@100337 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
STATUS
modules/generators/mod_cgid.c

diff --git a/CHANGES b/CHANGES
index a41feca631baa4d8b280aaa74d60ae995ba81ed1..29dd4d2a36be1b1be317a3fe5694b47b3caee18b 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,11 @@
 Changes with Apache 2.0.47
 
+  *) mod_cgid: Eliminate a double-close of a socket.  This resolves
+     various operational problems in a threaded MPM, since on the
+     second attempt to close the socket, the same descriptor was
+     often already in use by another thread for another purpose.
+     [Jeff Trawick]
+
   *) mod_negotiation: Introduce "prefer-language" environment variable,
      which allows to influence the negotiation process on request basis
      to prefer a certain language.  [AndrĂ© Malo]
diff --git a/STATUS b/STATUS
index c62eb8cf8ac59703be09dcf9e2c6f5e584d7369b..229e189aa58f358b956081f17725f48364abffc8 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -1,5 +1,5 @@
 APACHE 2.0 STATUS:                                              -*-text-*-
-Last modified at [$Date: 2003/06/23 11:16:10 $]
+Last modified at [$Date: 2003/06/23 12:28:24 $]
 
 Release:
 
@@ -248,13 +248,6 @@ PATCHES TO PORT FROM 2.1
         os/unix/unixd.h 1.138
         +1: trawick
 
-    * mod_cgid: Eliminate a double-close of a socket.  This resolves
-      various operational problems in a threaded MPM, since on the
-      second attempt to close the socket, the same descriptor was
-      often already in use by another thread for another purpose.
-        modules/generators/mod_cgid.c 1.151
-        +1: trawick, brianp, stoddard
-
 CURRENT RELEASE NOTES:
 
     * Backwards compatibility is expected of future Apache 2.0 releases,
index 34be91ee7bf7d721c92430389eedeb5639c95ab3..44845ff51afa9e339de04e545c6e609c3a0258b8 100644 (file)
@@ -1189,22 +1189,21 @@ static apr_status_t cleanup_script(void *vptr)
         return APR_EGENERAL;
     }
 
+    /* we got a socket, and there is already a cleanup registered for it */
+
     req.req_type = GETPID_REQ;
     req.conn_id = info->r->connection->id;
 
     stat = sock_write(sd, &req, sizeof(req));
     if (stat != APR_SUCCESS) {
-        close(sd);
         return stat;
     }
 
     /* wait for pid of script */
     stat = sock_read(sd, &pid, sizeof(pid));
     if (stat != APR_SUCCESS) {
-        close(sd);
         return stat;
     }
-    close(sd);
 
     if (pid == 0) {
         ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, info->r,