From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 16 05:54:22 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6756816A41F for ; Sun, 16 Oct 2005 05:54:22 +0000 (GMT) (envelope-from joseph.koshy@gmail.com) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.204]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0001143D46 for ; Sun, 16 Oct 2005 05:54:21 +0000 (GMT) (envelope-from joseph.koshy@gmail.com) Received: by xproxy.gmail.com with SMTP id t13so589837wxc for ; Sat, 15 Oct 2005 22:54:21 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=bmmFzmIk7RZ/zwRZWjW3UwK2qfnKury6JvsqRv3xduByDkwSsiwtW44ZGPc+cxJDjf2eCoASJtTZY38luoYTYAEWJNEaB4TiLuvGy9XY56MhH0Wp6clqvM0hvVg1D+Lc/9IdolNIo/cisv5X30XVJCQ5YJJ0OEXgWM8sRAUouFI= Received: by 10.70.69.20 with SMTP id r20mr1856822wxa; Sat, 15 Oct 2005 22:54:21 -0700 (PDT) Received: by 10.70.116.10 with HTTP; Sat, 15 Oct 2005 22:54:21 -0700 (PDT) Message-ID: <84dead720510152254j5a75ee1ewad3b7556145fca3@mail.gmail.com> Date: Sun, 16 Oct 2005 11:24:21 +0530 From: Joseph Koshy To: Tony Maher In-Reply-To: <4351DEDE.9000900@uts.edu.au> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <4351DEDE.9000900@uts.edu.au> Cc: hackers@freebsd.org Subject: Re: getenv semantics X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2005 05:54:22 -0000 > Is this analysis correct? Can someone point me to the (a?) > standard that describes this. The FreeBSD behaviour makes > sense, I am trying to understand what is the expected > behaviour on other platforms. >From "The Open Group Base Specifications Issue 6" http://www.cnop.net/docs/susv3/functions/getenv.html "The getenv() function shall search the environment of the calling process (see the Base Definitions volume of IEEE Std 1003.1-2001, Chapter 8, Environment Variables) for the environment variable name if it exists and return a pointer to the value of the environment variable. If the specified environment variable cannot be found, a null pointer shall be returned." -- FreeBSD Volunteer, http://people.freebsd.org/~jkoshy