apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Stoddard" <b...@wstoddard.com>
Subject RE: cvs commit: apr-util/buckets apr_buckets_pipe.c
Date Fri, 12 Jul 2002 19:16:46 GMT

> On 12 Jul 2002 bnicholes@apache.org wrote:
>
> >   -        apr_file_pipe_timeout_set(p, 0);
> >   +        // Only mess with the timeout if we are in a blocking state
> >   +        //  otherwise we are already nonblocking so don't
> worry about it.
> >   +        if (timeout < 0) {
> >   +            apr_file_pipe_timeout_set(p, 0);
> >   +        }
>
> I'm totally confused by this.  So you're saying you want to have a timeout
> in nonblocking mode?  How is that possible?  And why < and not > ?
>
> --Cliff
>

Humm..... we better not do anything in platform generic code that makes any
assumptions about the realtionship between a socket's (or pipe's) blocking
mode and timeouts.  On Unix, sockets that you want to set timeouts on are
nonblocking (ie, we do an i/o call, get EWOULDBLOCK then call select or poll
with a timeout). On Windows, sockets for which we want to set timeouts are
set to blocking mode.  Calls to setsockopt are made to set receive and send
timeouts and the timeouts are handled inside the network i/o call rather
than via select or poll.

Bill


Mime
View raw message