chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-hackers] [PATCH] Fix #765 and a small can of worms related


From: Peter Bex
Subject: Re: [Chicken-hackers] [PATCH] Fix #765 and a small can of worms related to error handling under Windows
Date: Thu, 28 Nov 2013 21:11:15 +0100
User-agent: Mutt/1.4.2.3i

On Fri, Nov 22, 2013 at 09:43:31PM +0100, Peter Bex wrote:
> The error handling in Windows was completely broken; the errmap
> loop updated map, but looked at errmap.

On Wed, Nov 20, 2013 at 11:20:57PM +0100, Peter Bex 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 now believe supporting Windows is the biggest mistake ever made
in CHICKEN.  It's just too much of a hassle.  It's semi-POSIX compatible
but at the same time it's not at all.
See 
http://msdn.microsoft.com/en-us/library/windows/desktop/ms737828%28v=vs.85%29.aspx
for a peek over the edge of sanity, at That Which Lurks in Redmond.

This whole error handling shit needs to get reworked to make the
Windows error->errno conversion used everywhere.  Winsock2 only *looks*
like the BSD sockets API, it uses the same function names but its error
handling is completely different so it's not really compatible.

So my advice for now is NOT to apply these two patches yet, but rework
them in a complete overhaul of Windows error handling.  That naturally
means that the stability branch should NOT get any of these patches,
because the changes will just be too invasive.

This is so depressing.  I'll look into it again when I have some more
energy and am not so easily sent into a total panic.

Cheers,
Peter
-- 
http://www.more-magic.net



reply via email to

[Prev in Thread] Current Thread [Next in Thread]