From owner-freebsd-stable@FreeBSD.ORG Sun Apr 6 22:02:47 2008 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B028106564A for ; Sun, 6 Apr 2008 22:02:47 +0000 (UTC) (envelope-from bc979@lafn.org) Received: from zoot.lafn.org (zoot.lafn.ORG [206.117.18.6]) by mx1.freebsd.org (Postfix) with ESMTP id D4DA68FC1D for ; Sun, 6 Apr 2008 22:02:46 +0000 (UTC) (envelope-from bc979@lafn.org) Received: from [10.0.1.2] (pool-71-109-162-173.lsanca.dsl-w.verizon.net [71.109.162.173]) (authenticated bits=0) by zoot.lafn.org (8.13.6/8.13.4) with ESMTP id m36M2jjX056203 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Sun, 6 Apr 2008 15:02:46 -0700 (PDT) (envelope-from bc979@lafn.org) Message-Id: From: Doug Hardie To: Jeremy Chadwick In-Reply-To: <20080406214524.GA72199@eos.sc1.parodius.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v919.2) Date: Sun, 6 Apr 2008 15:02:44 -0700 References: <1794897B-7A36-412A-8849-87F10268EBAE@lafn.org> <20080406214524.GA72199@eos.sc1.parodius.com> X-Mailer: Apple Mail (2.919.2) X-Virus-Scanned: ClamAV 0.88.7/6635/Sun Apr 6 09:29:31 2008 on zoot.lafn.org X-Virus-Status: Clean Cc: FreeBSD Stable Subject: Re: getenv in FreeBSD 7 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Apr 2008 22:02:47 -0000 On Apr 6, 2008, at 14:45, Jeremy Chadwick wrote: > On Sun, Apr 06, 2008 at 02:37:06PM -0700, Doug Hardie wrote: >> Somewhere between FreeBSD 6.2 and 7.0 getenv has been changed to >> return a >> null if an environment variable is set but has no value. I don't >> find >> anything anywhere in the documentation/man pages on this. As a >> result, you >> cannot distinguish between a variable that is not set and one that >> is set >> to a value of "". Is this a bug or a feature change? > > I'd begin peeking here: > > http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libc/stdlib/getenv.c Did that prior to my original posting. I find nothing there on it.