From: Jeff Trawick Date: Tue, 13 Apr 2010 14:58:03 +0000 (+0000) Subject: generalize the existing (r589761) platform- and errno-specific X-Git-Tag: 2.3.6~212 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=79d196b3b2cf9e9a734de8ee79ccaa5d71cb4014;p=thirdparty%2Fapache%2Fhttpd.git generalize the existing (r589761) platform- and errno-specific 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 --- diff --git a/os/unix/unixd.c b/os/unix/unixd.c index 1eb43732a01..0889672a9f0 100644 --- a/os/unix/unixd.c +++ b/os/unix/unixd.c @@ -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;