summaryrefslogtreecommitdiff
path: root/os
diff options
context:
space:
mode:
authorJeff Trawick <trawick@apache.org>2010-04-13 14:58:03 +0000
committerJeff Trawick <trawick@apache.org>2010-04-13 14:58:03 +0000
commit79d196b3b2cf9e9a734de8ee79ccaa5d71cb4014 (patch)
tree8e17d3677c33405ed086befe1ddcfaa9c00650fc /os
parent72f9e3b91ec3f4422cfd38219e391749dd664315 (diff)
downloadhttpd-79d196b3b2cf9e9a734de8ee79ccaa5d71cb4014.tar.gz
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
Diffstat (limited to 'os')
-rw-r--r--os/unix/unixd.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/os/unix/unixd.c b/os/unix/unixd.c
index 1eb43732a0..0889672a9f 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;