From owner-freebsd-hackers Mon Aug 9 18:10:30 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from november.jaded.net (november.jaded.net [216.94.113.4]) by hub.freebsd.org (Postfix) with ESMTP id 83CA115341 for ; Mon, 9 Aug 1999 18:10:28 -0700 (PDT) (envelope-from dan@november.jaded.net) Received: (from dan@localhost) by november.jaded.net (8.9.3/8.9.3+trinsec_nospam) id VAA47777; Mon, 9 Aug 1999 21:21:47 -0400 (EDT) Date: Mon, 9 Aug 1999 21:21:47 -0400 From: Dan Moschuk To: Joe Groff Cc: louie@TransSys.COM, steve_tarkalson@hotmail.com, bmcgover@cisco.com, hackers@FreeBSD.ORG Subject: Re: gethostbyaddr() and threads. Message-ID: <19990809212147.A47699@trinsec.com> References: <199908092322.TAA68246@whizzo.transsys.com> <199908100053.RAA28787@home.humboldt1.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.4i In-Reply-To: <199908100053.RAA28787@home.humboldt1.com>; from Joe Groff on Mon, Aug 09, 1999 at 05:53:48PM -0700 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG | 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. 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. Thanks, Dan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message