[tolj@wapme-systems.de: Re: Problem with accept?!!

Thomas Pfaff tpfaff@gmx.net
Wed Jun 4 08:11:00 GMT 2003


Corinna Vinschen wrote:
> Hi Thomas,
> 
> On Tue, Jun 03, 2003 at 04:58:17PM +0200, Thomas Pfaff wrote:
> 
>>Before someone will notice this and try to blame us one more patch.
>>If a connect is interrupted subsequent calls to connect should fail and 
>>select must be used instead. With this patch EINPROGRESS (119) will be 
>>returned but i think that according to 
>>http://www.opengroup.org/onlinepubs/007904975/functions/connect.html
>>it should be EALREADY (120).
> 
> 
> I think it's ok as it is now.  Regardless of the above SUSv3 stuff 
> I've checked the very same situation on Linux and on Linux it's no
> problem to call connect again (I've tested on glibc 2.3.2).  The
> first call returns EINTR, the second call blocks as usual and returns
> the same way as our current code does (in my test with ECONNREFUSED).
> 
> It's a bit weird that Linux behaves different than the SUSv3 description
> suggests, though.  Hmm.
> 
I did a test on HP-UX 10.20 and Solaris too:

HP-UX returned EADDRINUSE on the second connect.
Solaris returned EALREADY just as i thought it should.

If the primary goal is to be Linux compliant then it is okay to keep the 
current code.

Thomas



More information about the Cygwin-developers mailing list