Subject: Re: connect() behavior with non-blocking I/O
To: Takahiro Kambe <taca@back-street.net>
From: Sean Boudreau <seanb@qnx.com>
List: tech-net
Date: 08/19/2003 09:49:00
This ties in with the observation I raised in tech-net
on June 17 WRT not being able to call connect() again after
ECONREFUSED.  It didn't generate much debate at the time.

-seanb

On Tue, Aug 19, 2003 at 08:48:07PM +0900, Takahiro Kambe wrote:
> Hi.
> 
> I've filled PR kern/22522 "connect(2) may fail with EINVAL which isn't
> undocumented.".
> 
> As far as reading current connect(2), it is OK repeating connect()
> with non-blocking socket and expecting errno would change:
> 
> 1. EINPROGRESS
> 2. EALREADY, EISCONN, ECONNREFUSED or something other error
> 
> But currently second connect() returns EINVAL (not documented on
> connect(2)).
> 
> (Of cource, there is another way to use select(2) or poll(2).)
> 
> What is the correct behavior of connect() with non-blocking I/O?
> 
> -- 
> Takahiro Kambe <taca@back-street.net>
>