cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Re: DNS Resolve problems on 2.4.18 Linux

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 28 Oct 2003 09:26:40 +0100 (CET)

On Mon, 27 Oct 2003, Dan C wrote:

> >> I only have one concern here: 'errno' is not generally thread-safe.

> Yes I hear that concern... doing a little more digging and adding some more
> trace info, here is what comes back from glibc when only using h_errnop.
> Looks like a bug in glibc.

Yes. It seems utterly stupid to return -1 in the two different return codes it
provides, and then set the actual value we're interested in in a variable that
isn't thread-safe...

We know that later versions don't do it like that, so I take it someone in the
glibc team figured out that this wasn't the smartest approach...

> == Info: gethostbyname_r(2) failed res: (-1), h_errnop: (-1), errno: (34)
> ERANGE=34, EAGAIN=11

This is proof enough for me. Thanks!

-- 
 Daniel Stenberg -- curl: been grokking URLs since 1998
-------------------------------------------------------
This SF.net email is sponsored by: The SF.net Donation Program.
Do you like what SourceForge.net is doing for the Open
Source Community?  Make a contribution, and help us add new
features and functionality. Click here: http://sourceforge.net/donate/
Received on 2003-10-28