httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject svn commit: r589761 - /httpd/httpd/trunk/os/unix/unixd.c
Date Mon, 29 Oct 2007 17:38:11 GMT
Author: martin
Date: Mon Oct 29 10:38:11 2007
New Revision: 589761

URL: http://svn.apache.org/viewvc?rev=589761&view=rev
Log:
After a stop or restart signal, the old listening sockets
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.

Modified:
    httpd/httpd/trunk/os/unix/unixd.c

Modified: httpd/httpd/trunk/os/unix/unixd.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/os/unix/unixd.c?rev=589761&r1=589760&r2=589761&view=diff
==============================================================================
--- httpd/httpd/trunk/os/unix/unixd.c (original)
+++ httpd/httpd/trunk/os/unix/unixd.c Mon Oct 29 10:38:11 2007
@@ -593,6 +593,14 @@
             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;



Mime
View raw message