httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@gmail.com>
Subject Re: cvs commit: httpd-2.0/os/unix os.h unixd.c
Date Fri, 01 Oct 2004 18:31:37 GMT
On 1 Oct 2004 16:03:09 -0000, jfclere@apache.org <jfclere@apache.org> wrote:
> jfclere     2004/10/01 09:03:09
> 
>   Modified:    os       config.m4
>                os/unix  os.h unixd.c
>   Log:
>   Move the few BS2000 specific in unixd.c

>   Index: unixd.c
>   ===================================================================
>   RCS file: /home/cvs/httpd-2.0/os/unix/unixd.c,v
>   retrieving revision 1.69
>   retrieving revision 1.70
>   diff -u -r1.69 -r1.70
>   --- unixd.c   24 Apr 2004 19:42:52 -0000      1.69
>   +++ unixd.c   1 Oct 2004 16:03:08 -0000       1.70
>   @@ -457,11 +457,26 @@
>    {
>        apr_socket_t *csd;
>        apr_status_t status;
>   +#ifdef _OSD_POSIX
>   +    int sockdes;
>   +#endif
> 
>        *accepted = NULL;
>        status = apr_socket_accept(&csd, lr->sd, ptrans);
>        if (status == APR_SUCCESS) {
>            *accepted = csd;
>   +#ifdef _OSD_POSIX
>   +        apr_os_sock_get(&sockdes, csd);
>   +        if (sockdes >= FD_SETSIZE) {
>   +            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, NULL,
>   +                         "new file descriptor %d is too large; you probably need "
>   +                         "to rebuild Apache with a larger FD_SETSIZE "
>   +                         "(currently %d)",
>   +                         sockdes, FD_SETSIZE);
>   +            apr_socket_close(csd);
>   +            return APR_EINTR;
>   +        }
>   +#endif

the old logic was removed on purpose

an analogous check is in APR at the point where select() is actually
needed; an error will be returned from the apr poll call or the apr
send/recv call

the APR check covers not just sockets but also pipes used to
communicate with CGIs

it would be nice if there was a special APR error code to use there
with a unique error message though

(btw, it is APR that would need to be rebuilt)

Mime
View raw message