Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Aug 1999 18:16:18 -0700 (PDT)
From:      Joe Groff <ognir@humboldt1.com>
To:        dan@trinsec.com
Cc:        louie@TransSys.COM, steve_tarkalson@hotmail.com, bmcgover@cisco.com, hackers@FreeBSD.ORG
Subject:   Re: gethostbyaddr() and threads.
Message-ID:  <199908100116.SAA02821@home.humboldt1.com>
In-Reply-To: <19990809212147.A47699@trinsec.com>

next in thread | previous in thread | raw e-mail | index | archive | help
---Dan Moschuk said:
> 
> | Well, I guess we might as well change the API, since everyone else does.
> Unless
> | someone comes up with a bettter idea, of course :)
> | 
> | -Joe
> 
> The API should not change.  There is already enough descrepency between UNIXs
> to warrant programs like autoconf, we should not introduce another.
> We should introduce a gethostbyaddr_r function, which shouldn't be all that
> though to implement.
That's what I meant by an API change. Sorry for not being clearer.
However, if you can roll in reentrancy without having to add the _r
functions, that would save some sweat on the programmers' side.
 
>>From the code that I looked at today, the problems lie inside of glibc.  It 
> declares globally a few static variables that are used by the gethost* 
> functions.  Obviously in a threaded environment, this is bad.
> 
> A nice fix would be to get rid of those variables entirely.  A quicker fix 
> would be just to enclose those global variables in mutexes.  Personally, I 
> like the nicer fix better, which will (unfortunately) involve rewriting most 
> of the frontends to the res_* functions.
> 
> If no one has any objections, I'd like to start on this tomorrow.
> 
Go for it! Someone needs to. :)




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199908100116.SAA02821>