Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Apr 2000 11:04:37 +0200
From:      Samuel Tardieu <sam@inf.enst.fr>
To:        Ming Zhang <ming@yahoo-inc.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Multithread safe gethostbyname() ?
Message-ID:  <2000-04-12-11-04-37%2Btrackit%2Bsam@inf.enst.fr>
In-Reply-To: <Pine.BSF.4.10.10004111813310.81762-100000@pious.yahoo.com>; from ming@yahoo-inc.com on Tue, Apr 11, 2000 at 06:26:49PM -0700
References:  <Pine.BSF.4.10.10004111813310.81762-100000@pious.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 11/04, Ming Zhang wrote:

| On Solaris there is gethostbyname_r().  Calling gethostbyname() with in
| two threads cause both threads to block.

gethostbyname_r exists, at least in 4.0, but is poorly implemented (it is
in fact not thread safe). However, if you are using 4.0, you should consider
using getipnodebyname(), which is MT-safe and more powerful than the
old gethostbyX functions.



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?2000-04-12-11-04-37%2Btrackit%2Bsam>