From owner-freebsd-hackers Wed Apr 12 4:36:23 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from server.baldwin.cx (jobaldwi.campus.vt.edu [198.82.67.146]) by hub.freebsd.org (Postfix) with ESMTP id 76F8C37B6B1 for ; Wed, 12 Apr 2000 04:36:21 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: from john.baldwin.cx (john [10.0.0.2]) by server.baldwin.cx (8.9.3/8.9.3) with ESMTP id HAA32335; Wed, 12 Apr 2000 07:36:19 -0400 (EDT) (envelope-from jhb@FreeBSD.org) Message-Id: <200004121136.HAA32335@server.baldwin.cx> X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <200004120538.WAA17491@sharmas.dhs.org> Date: Wed, 12 Apr 2000 07:36:19 -0400 (EDT) From: John Baldwin To: ming@yahoo-inc.com Subject: Re: Multithread safe gethostbyname() ? Cc: hackers@FreeBSD.org Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > In muc.lists.freebsd.hackers, you wrote: > > 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. -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.cslab.vt.edu/~jobaldwi/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message