< Previous by Date Date Index Next by Date >
< Previous in Thread Thread Index  

Re: [reSIProcate] thread-safe version of gethostbyname for mac OSX


I thought I sent something about this in already.

gethostbyname _is_ threadsafe on mac. It uses pthread keys
to localize data.

Now - the problem we're fighting on mac was that we were exhausing
those keys, and the gethostbyname implementation on the mac doesn't
check to see if it gets one when it asks for it.

The fix I checked into Log.cxx will make the mac problem with DnsUtil
go away.

We have some more to talk about to see if that's the final version of that
fix though, but it's unrelated to this thread.

RjS

On Oct 10, 2005, at 2:51 PM, Jason Fischl wrote:

Is there a version of gethostbyname that is thread-safe on MAC? On
most operating systems there is a function gethostbyname_r that is
thread-safe. gethostbyname returns a pointer to static memory and is
thus not reentrant. Trying to fix DnsUtil for MAC.

Can Mac folks chime in here.

Jason
_______________________________________________
resiprocate-devel mailing list
resiprocate-devel@xxxxxxxxxxxxxxxxxxx
https://list.sipfoundry.org/mailman/listinfo/resiprocate-devel