curl-library
Re: v2 of patch to fix busy-waiting during Windows async name lookup
Date: Mon, 7 Sep 2009 09:09:09 -0700
On Mon, Sep 7, 2009 at 5:15 AM, Jamie Lokier <jamie_at_shareable.org> wrote:
> Constantine Sapuntzakis wrote:
> > +The dummy descriptor trick does not seem to work on Windows XP SP3.
>
> Can you say a bit more about what fails?
>
> The dummy socket is always writable.
> What is it about the dummy descriptor that fails on XP SP3? Does it
> fail every time, or occasionally?
>
> Every time.
> "Does not seem to work" isn't much of an explanation and it doesn't
> give the user much information to decide if they need the NODUMMY
> option or not. Does it fail on XP SP4, Vista or Windows 7, ME, XP
> embedded, or any other version?
>
> Fails on Windows 7 and XP SP3. Haven't tested others - I don' t have them
handy right now.
I've attached test code. Interestingly, it shows the dummy socket is never
readable or exceptable on XP SP3 and Win7. So, the dummy socket trick might
work for these two versions of Windows if we ask the caller to check for
readability instead of writability.
However, this is undocumented behavior or at least very uncommon behavior
and thus susceptible to changes across different versions of the Microsoft
OS.
-Costa
- application/octet-stream attachment: socket_test.cpp