]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
generalize the existing (r589761) platform- and errno-specific
authorJeff Trawick <trawick@apache.org>
Tue, 13 Apr 2010 14:58:03 +0000 (14:58 +0000)
committerJeff Trawick <trawick@apache.org>
Tue, 13 Apr 2010 14:58:03 +0000 (14:58 +0000)
logic to suppress an error message if accept() fails after the
socket has been marked inactive

a message will still be logged, but at debug level instead of error

PR: 49058

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

os/unix/unixd.c

index 1eb43732a01ca0eec3e696076f2d2e613d28a512..0889672a9f0c82f25b870aebf2d2ddaca4ed90dc 100644 (file)
@@ -416,14 +416,15 @@ AP_DECLARE(apr_status_t) ap_unixd_accept(void **accepted, ap_listen_rec *lr,
 #endif /*ENETDOWN*/
 
         default:
-#ifdef _OSD_POSIX /* Possibly on other platforms too */
             /* If the socket has been closed in ap_close_listeners()
              * by the restart/stop action, we may get EBADF.
              * Do not print an error in this case.
              */
-            if (!lr->active && status == EBADF)
+            if (!lr->active) {
+                ap_log_error(APLOG_MARK, APLOG_DEBUG, status, ap_server_conf,
+                             "apr_socket_accept failed for inactive listener");
                 return status;
-#endif
+            }
             ap_log_error(APLOG_MARK, APLOG_ERR, status, ap_server_conf,
                          "apr_socket_accept: (client socket)");
             return APR_EGENERAL;