From owner-freebsd-hackers Fri May 31 14: 2: 8 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from wartch.sapros.com (rularan.sapros.com [204.182.55.17]) by hub.freebsd.org (Postfix) with ESMTP id D118837B406 for ; Fri, 31 May 2002 14:02:04 -0700 (PDT) Received: from wartch.sapros.com (localhost [127.0.0.1]) by wartch.sapros.com (8.12.3/8.12.3) with ESMTP id g4VL1vvj057289; Fri, 31 May 2002 14:01:57 -0700 (PDT) (envelope-from peterh@wartch.sapros.com) Message-Id: <200205312101.g4VL1vvj057289@wartch.sapros.com> To: Clint Olsen Cc: hackers@freebsd.org Subject: Re: Is gethostbyname2() reentrant? Date: Fri, 31 May 2002 14:01:57 -0700 From: Peter Haight X-Spam-Status: No, hits=1.8 required=7.0 tests=SUBJ_ENDS_IN_Q_MARK,NO_MX_FOR_FROM version=2.11 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG >On May 31, Peter Haight wrote: >> >> If I link with libc_r can I use gethostbyname2() at the same time in two >> different threads? > >Pardon my ignorance, but how does re-entrancy affect this? It would seem >that you're interested in a function that doesn't block. The function returns a pointer to some sort of memory. I'm worried that the the two separate requests could possibly mess up each others memory. Maybe I have the terminology wrong. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message