httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r488883 - in /httpd/httpd/branches/2.2.x: CHANGES STATUS server/listen.c
Date Wed, 20 Dec 2006 02:04:39 GMT
Author: jim
Date: Tue Dec 19 18:04:39 2006
New Revision: 488883

URL: http://svn.apache.org/viewvc?view=rev&rev=488883
Log:
Merge r487901 from trunk:

PR#37680: fix socket block/nonblock on restart/graceful
Patch submitted by Darius Davis (darius-abz free-range.com.au)

Submitted by: niq
Reviewed by: jim

Modified:
    httpd/httpd/branches/2.2.x/CHANGES
    httpd/httpd/branches/2.2.x/STATUS
    httpd/httpd/branches/2.2.x/server/listen.c

Modified: httpd/httpd/branches/2.2.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/CHANGES?view=diff&rev=488883&r1=488882&r2=488883
==============================================================================
--- httpd/httpd/branches/2.2.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.2.x/CHANGES [utf-8] Tue Dec 19 18:04:39 2006
@@ -1,6 +1,9 @@
                                                         -*- coding: utf-8 -*-
 Changes with Apache 2.2.4
 
+  *) core: Fix NONBLOCK status of listening sockets on restart/graceful
+     PR 37680.  [Darius Davis <darius-abz free-range.com.au>]
+
   *) mod_deflate: Rework inflate output and deflate output filter to fix several
      issues: Incorrect handling of flush buckets, potential memory leaks,
      excessive memory usage in inflate output filter for large compressed

Modified: httpd/httpd/branches/2.2.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/STATUS?view=diff&rev=488883&r1=488882&r2=488883
==============================================================================
--- httpd/httpd/branches/2.2.x/STATUS (original)
+++ httpd/httpd/branches/2.2.x/STATUS Tue Dec 19 18:04:39 2006
@@ -86,13 +86,6 @@
         http://mail-archives.apache.org/mod_mbox//httpd-dev/200609.mbox/%3c1404e5910609091218p84f4d2flc1000764b4966727@mail.gmail.com%3e
       +1: trawick, wrowe, jerenkrantz
 
-    * core: PR#37680
-      Fix NONBLOCK status of listening sockets on restart/graceful
-      http://svn.apache.org/viewvc?view=rev&revision=487901
-      +1: niq, wrowe, rpluem
-          wrowe adds; if use_nonblock was called multi_listeners
-          I woulda +1'ed this on my first readthrough.
-
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
 
     * mpm_winnt: Fix return values from wait_for_many_objects.

Modified: httpd/httpd/branches/2.2.x/server/listen.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/server/listen.c?view=diff&rev=488883&r1=488882&r2=488883
==============================================================================
--- httpd/httpd/branches/2.2.x/server/listen.c (original)
+++ httpd/httpd/branches/2.2.x/server/listen.c Tue Dec 19 18:04:39 2006
@@ -361,6 +361,9 @@
     int num_open;
     const char *userdata_key = "ap_open_listeners";
     void *data;
+#if AP_NONBLOCK_WHEN_MULTI_LISTEN
+    int use_nonblock;
+#endif
 
     /* Don't allocate a default listener.  If we need to listen to a
      * port, then the user needs to have a Listen directive in their
@@ -476,16 +479,15 @@
      * is already forgotten about by the time we call accept, we won't
      * be hung until another connection arrives on that port
      */
-    if (ap_listeners && ap_listeners->next) {
-        for (lr = ap_listeners; lr; lr = lr->next) {
-            apr_status_t status;
-
-            status = apr_socket_opt_set(lr->sd, APR_SO_NONBLOCK, 1);
-            if (status != APR_SUCCESS) {
-                ap_log_perror(APLOG_MARK, APLOG_STARTUP|APLOG_ERR, status, pool,
-                              "unable to make listening socket non-blocking");
-                return -1;
-            }
+    use_nonblock = (ap_listeners && ap_listeners->next);
+    for (lr = ap_listeners; lr; lr = lr->next) {
+        apr_status_t status;
+
+        status = apr_socket_opt_set(lr->sd, APR_SO_NONBLOCK, use_nonblock);
+        if (status != APR_SUCCESS) {
+            ap_log_perror(APLOG_MARK, APLOG_STARTUP|APLOG_ERR, status, pool,
+                          "unable to control socket non-blocking status");
+            return -1;
         }
     }
 #endif /* AP_NONBLOCK_WHEN_MULTI_LISTEN */



Mime
View raw message