From dev-return-7174-apmail-apr-dev-archive=apr.apache.org@apr.apache.org Fri Jul 12 19:13:21 2002 Return-Path: Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 98275 invoked by uid 500); 12 Jul 2002 19:13:21 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 98027 invoked from network); 12 Jul 2002 19:13:18 -0000 From: "Bill Stoddard" To: "APR Development List" Subject: RE: cvs commit: apr-util/buckets apr_buckets_pipe.c Date: Fri, 12 Jul 2002 15:16:46 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) Importance: Normal In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N > 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