[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-hackers] [PATCH] Fix nonblocking socket behaviour on Window
From: |
Mario Domenech Goulart |
Subject: |
Re: [Chicken-hackers] [PATCH] Fix nonblocking socket behaviour on Windows |
Date: |
Tue, 26 Nov 2013 01:24:55 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
Hi,
On Fri, 22 Nov 2013 21:09:34 -0600 Jim Ursetto <address@hidden> wrote:
> On Nov 20, 2013, at 4:20 PM, Peter Bex <address@hidden> wrote:
>
>> 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.
Unfortunately it seems to break something on XP. chicken-install gets a
TCP timeout error instantly:
address@hidden ~
$ date ; /c/local/chicken-master/bin/chicken-install.exe awful ; date
Tue Nov 26 00:27:59 GMT 2013
retrieving ...
connecting to host "chicken.kitten-technologies.co.uk", port 80 ...
TCP connect timeout
connecting to host "code.call-cc.org", port 80 ...
TCP connect timeout
Error: extension or version not found
Tue Nov 26 00:27:59 GMT 2013
Without this patch, I don't get the TCP timeout error.
Best wishes.
Mario
--
http://parenteses.org/mario