[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-hackers] [PATCH] Fix nonblocking socket behaviour on Window
From: |
Jim Ursetto |
Subject: |
Re: [Chicken-hackers] [PATCH] Fix nonblocking socket behaviour on Windows |
Date: |
Fri, 22 Nov 2013 21:09:34 -0600 |
On Nov 20, 2013, at 4:20 PM, Peter Bex <address@hidden> wrote:
> Hi all,
>
> Due to Shanmuhanathan's report I looked into Spiffy on Windows, and found
> out that multithreaded socket handling is completely broken there.
> Sockets are marked as nonblocking in tcp.scm, but that's done through
> fcntl() which is #defined as a no-op on Windows (because Windows has no
> fcntl() at all), so this could never have worked in the first place.
>
> I found some notes in the Windows documentation about some select()-like
> procedure automatically marking any sockets you pass to it as nonblocking,
> so perhaps this may have obscured this problem in the past if somehow
> a thread yielded before reading from such a socket.
>
> Attached is a patch which enables the marking of sockets as nonblocking
> for Windows. This should definitely go into the stability branch!
Agreed, again as long as it works on XP, or at least doesn't break XP.
Jim