Testers wanted: reentrant resolver

Peter Jeremy peterjeremy at optushome.com.au
Sat Feb 21 04:12:51 PST 2004


On Fri, Feb 20, 2004 at 07:48:31PM -0500, Brian F. Feldman wrote:
>Other APIs have the option of failing.  __h_errno() does not have the option 
>of failing, so what do I do if pthread_key_create() fails?  Also, if 
>malloc() fails each time pthread_getspecific() returns NULL for the thread?

An off-the-top-of-my-head answer would be for __h_errno() to return
NETDB_INTERNAL with the relevant error in errno.  My gut feeling is
that if pthread_key_create() or malloc() fails, you have far more
serious issues with that thread/process than not knowing whether
a DNS lookup worked or not.

Peter


More information about the freebsd-current mailing list