This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: 1.5.19-2 fcntl invaild argument error changing socket blocking mode

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 Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]