On 13.04.2010 16:58, traw...@apache.org wrote:
> Author: trawick
> Date: Tue Apr 13 14:58:03 2010
> New Revision: 933657
> 
> URL: http://svn.apache.org/viewvc?rev=933657&view=rev
> Log:
> 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
> 
> 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=933657&r1=933656&r2=933657&view=diff
> ==============================================================================
> --- httpd/httpd/trunk/os/unix/unixd.c (original)
> +++ httpd/httpd/trunk/os/unix/unixd.c Tue Apr 13 14:58:03 2010
> @@ -416,14 +416,15 @@ AP_DECLARE(apr_status_t) ap_unixd_accept
>  #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;

Hm, why do we return the real error code in case the socket is already closed
and APR_EGENERAL in the other case. Shouldn't this be consistent?

Regards

RĂ¼diger

Reply via email to