Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Apr 2007 20:36:24 +0200
From:      Henrik Brix Andersen <henrik@brixandersen.dk>
To:        "Andrey A. Chernov" <ache@FreeBSD.org>
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
Message-ID:  <20070430183624.GA73050@tirith.brixandersen.dk>
In-Reply-To: <200704301656.l3UGuIqf048148@repoman.freebsd.org>
References:  <200704301656.l3UGuIqf048148@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--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 <henrik@brixandersen.dk>

--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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070430183624.GA73050>