Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <02bf01c213da$19283960$6132bc3e@BABEL> From: "Conrad Scott" To: References: <007f01c21348$72149600$5a6d3850 AT piggy> <08ce01c2134f$7e2a4a00$6132bc3e AT BABEL> Subject: Re: Cygwin && TCP && O_NONBLOCK Date: Fri, 14 Jun 2002 20:31:35 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 "Conrad Scott" wrote: > So I assume you call connect(2) once then wait for select(2) or poll(2) to > give you a writable status, which they do once the connection eventually > succeeds or fails (this is mentioned in their respective man pages). So it > looks like Linux is wrong and cygwin is right. It occurred to me that I wasn't sure, on this account of non-blocking use of connect(2), how to get hold of the connect/fail status of the connection, once select(2) or poll(2) confirmed it was available. The answer: use getsockopt(2) to check the SO_ERROR value. (Tho' I can't find mention of this in any of the standards docs: just the Linux man pages.) So that's okay then. // Conrad -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/