1.5.19-2 fcntl invaild argument error changing socket blocking mode

Corinna Vinschen corinna-cygwin@cygwin.com
Fri Jan 20 10:52:00 GMT 2006


On Jan 19 18:08, Martin wrote:
> I'm trying to compile TCL 8.4.12 using the 'unix' not
> the 'win' target files. The target 'tclsh.exe' builds
> ok with some modifications to various source files.
> Now, I'm attempting to check the resulting build with
> the TCL test suite.
> Granted, there are numerous failures.
> One failure in particular is somewhat bizarre.  It
> involves changing a socket from blocking mode, to
> non-blocking mode and back to blocking.
> 
> The attached test case illustrates this. Please excuse
> the ugliness.
> 
> Is anything obviously wrong, that explains this
> behaviour.

Not in your code.  I have fixed this in Cygwin, even though I don't
see why this was necessary.  Each blocking send/recv is actually
a nonblocking send/recv with WSAEventSelect handling.  Each single
call switches event handling on, calls recv or send, and switches
event handling off again.  Even though this seems to work correctly
throughout, I still had to  swtich off event handling explicitely
right before calling ioctlsocket(FIONBIO).  That's what my fix does
now unconditionally.


Thanks for the report and *especially* the simple testcase,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list