Date: Wed, 12 Apr 2000 13:41:58 -0400 From: Dan Moschuk <dan@FreeBSD.ORG> To: John Baldwin <jhb@FreeBSD.ORG> Cc: ming@yahoo-inc.com, hackers@FreeBSD.ORG Subject: Re: Multithread safe gethostbyname() ? Message-ID: <20000412134158.A5630@spirit.jaded.net> In-Reply-To: <200004121136.HAA32335@server.baldwin.cx>; from jhb@FreeBSD.ORG on Wed, Apr 12, 2000 at 07:36:19AM -0400 References: <200004120538.WAA17491@sharmas.dhs.org> <200004121136.HAA32335@server.baldwin.cx>
next in thread | previous in thread | raw e-mail | index | archive | help
| > Is there a MT-safe implementation of gethostbyname() in FreeBSD (3.4/4.0)? | > | > On Solaris there is gethostbyname_r(). Calling gethostbyname() with in | > two threads cause both threads to block. | | No. :( Until we get one you can work around it by using a mutex around | calls to gethost* to allow only 1 thread to call them at a time. That won't work either, since, if I remember correctly, the returned struct hostent is static. -Dan -- Dan Moschuk (TFreak!dan@freebsd.org) "Waste not fresh tears on old griefs." 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?20000412134158.A5630>