are closed. "Some platforms" drop out of the accept() with
an EBADF after the sockets have been closed. Such an
error should not clutter the logs.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@589761
13f79535-47bb-0310-9956-
ffa450edef68
return APR_EGENERAL;
#else
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)
+ return status;
+#endif
ap_log_error(APLOG_MARK, APLOG_ERR, status, ap_server_conf,
"apr_socket_accept: (client socket)");
return APR_EGENERAL;