cURL / Mailing Lists / curl-library / Single Mail


Re: resolver thread deadlock during Windows DLL attach

From: Mohun Biswas <>
Date: Tue, 01 Jan 2008 20:09:36 -0500

Daniel Stenberg wrote:

> The alternative to that, is to make sure USE_THREADING_GETHOSTBYNAME
> isn't defined in lib/setup.h when you build libcurl as then it won't
> build with a threaded resolver but instead use the built-in fallback
> method: plain synchronous lookup with gethostbyname().

Thanks! It did solve the problem (though I'm running into other issues
along the lines of what Jamie predicted). But my test case which hung in
the resolver no longer does so. Time to drill in deeper on the other issues.

> In fact, using c-ares would solve your problem and still allow the name
> resolve to get timed out (if you want to). But it would also add another
> lib of course...

I tried c-ares last night. I was able to get it built and configure
libcurl to use it (I think) but the result didn't seem to fix the
problem. Is there something I need to pass with e.g. curl_easy_setopt()
or should the simple fact of being configured with ares have fixed it?
The no-threads answer above is simpler and probably for my case but I'm
still curious.

Received on 2008-01-02