|
|
cURL Mailing List Monthly Index Single Mail
curl-library Archives
Re: [PATCH, RFC] Make hostthre.c work on POSIX
From: Yang Tse <yangsita_at_gmail.com>
Date: Fri, 13 Nov 2009 12:11:10 +0100
2009/11/13, Jamie Lokier wrote:
> > Take for example systems that expose all four getaddrinfo,
He,he! Answering posts when in a hurry is something I should learn not
> From a thread-safety point of view, getaddrinfo is like
Of course.
> The only problem with getaddrinfo is that some people implemented it
And others had thread safe versions which leaked memory when cancelled
> As far as I know, nobody has ever implemented gethostbyname_r as a
> That's why the presence of gethostbyname_r could be a clue that the
I partially agree with that. I would be a bit more picky and say that
> and so getaddrinfo is likely to be thread safe to.
Not necessarily true. But since you say 'likely', you admit the
> Even if getaddrinfo is a wrapper, it is likely to be wrapping
Two concatenated 'likely's reduce the likelihood.
:-)
> I don't know if presence of gethostbyname_r really means getaddrinfo
I haven't said it was a bad idea. I said that I would prefer not to
It would be nice if we could actually test if getaddrinfo is thread
So we must fall back to simpler tests and some hard-coded knowledge in
And here is the meat of the getaddrinfo thread safe capability test.
Do we want to avoid false positives or false negatives?
If the test result says that getaddrinfo is thread safe, and it
On the other hand, if the test result says that getaddrinfo is not
Those are my reasons for preferring a false negative over a false
And that was the reason for current incarnation of the getaddrinfo
But, I also see that this is a big pain as it would force us to add
So, what's next?
Admit that to make this maintainable some false positive, saying that
For the configure script...
if getaddrinfo exists then
OK to this? Costa, Daniel, Jamie, Joshua?
-- -=[Yang]=- ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2009-11-13 These mail archives are generated by hypermail. |
Page updated November 16, 2009.
web site info