From owner-cvs-all@FreeBSD.ORG Mon Apr 30 18:36:27 2007 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 13A9D16A402; Mon, 30 Apr 2007 18:36:27 +0000 (UTC) (envelope-from henrik@brixandersen.dk) Received: from solow.pil.dk (relay.pil.dk [195.41.47.164]) by mx1.freebsd.org (Postfix) with ESMTP id C826B13C45A; Mon, 30 Apr 2007 18:36:26 +0000 (UTC) (envelope-from henrik@brixandersen.dk) Received: from tirith.brixandersen.dk (osgiliath.brixandersen.dk [87.53.223.189]) by solow.pil.dk (Postfix) with ESMTP id 79BBC1CC0F4; Mon, 30 Apr 2007 20:36:25 +0200 (CEST) Received: by tirith.brixandersen.dk (Postfix, from userid 1001) id E3C86B848; Mon, 30 Apr 2007 20:36:24 +0200 (CEST) Date: Mon, 30 Apr 2007 20:36:24 +0200 From: Henrik Brix Andersen To: "Andrey A. Chernov" Message-ID: <20070430183624.GA73050@tirith.brixandersen.dk> Mail-Followup-To: "Andrey A. Chernov" , src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org References: <200704301656.l3UGuIqf048148@repoman.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="envbJBWh7q8WU6mo" Content-Disposition: inline In-Reply-To: <200704301656.l3UGuIqf048148@repoman.freebsd.org> X-PGP-Key: http://www.brixandersen.dk/files/HenrikBrixAndersen.asc User-Agent: Mutt/1.5.15 (2007-04-06) Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/lib/libc/stdlib getenv.3 getenv.c putenv.c setenv.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Apr 2007 18:36:27 -0000 --envbJBWh7q8WU6mo Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Mon, Apr 30, 2007 at 04:56:18PM +0000, Andrey A. Chernov wrote: > ache 2007-04-30 16:56:18 UTC >=20 > FreeBSD src repository >=20 > Modified files: > lib/libc/stdlib getenv.3 getenv.c putenv.c setenv.c=20 > Log: > Make putenv() fully conforms to Open Group specs Issue 6 > (also IEEE Std 1003.1-2001) > =20 > The specs explicitly says that altering passed string > should change the environment, i.e. putenv() directly puts its arg > into environment (unlike setenv() which just copies it there). > It means that putenv() can't be implemented via setenv() > (like we have before) at all. Putenv() value lives (allows modifying) > up to the next putenv() or setenv() call. Todays changes to *env() appears to have broken stuff (my -CURRENT box fails to build many ports after these changes, due to missing environment variables in the build environment). Here is a simple test-case: $ env -vi foo=3Dbar env #env clearing environ #env setenv: foo=3Dbar #env executing: env #env arg[0]=3D 'env' Notice that the second instance of env(1) doesn't see the $foo environment variable. This is the output of the same test on my RELENG_6 box: $ env -vi foo=3Dbar env #env clearing environ #env setenv: foo=3Dbar #env executing: env #env arg[0]=3D 'env' foo=3Dbar Regards, Brix --=20 Henrik Brix Andersen --envbJBWh7q8WU6mo Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) Comment: GnuPG signed iD8DBQFGNjcov+Q4flTiePgRAvjEAKCmKY0pBDCu0adHHfwVEbDyu/5hSACcCrS2 lK421DHkNGWi2B+G+/kT//I= =NxSs -----END PGP SIGNATURE----- --envbJBWh7q8WU6mo--