Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 09 Jun 2008 21:40:54 +0300
From:      Timo Sirainen <tss@iki.fi>
To:        freebsd-stable@freebsd.org
Subject:   Environment clearing broken in 7.0
Message-ID:  <1213036854.3904.967.camel@hurina>

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

--=-P5dWbwhPQ5WN/kDDEBIO
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

I think clearing environment using:

environ[0] =3D NULL;

has been kind of a semi-standard for a while now. At least Dovecot and
Postfix clears their environment this way. But this no longer works in
FreeBSD 7.0 (putenv(), environ[0]=3DNULL, putenv() -> everything is
visible again). Was this change intended, or will this be fixed?

Looks like I could work around this by using:

environ =3D NULL;

but I'm afraid what other OSes that change would break. I guess going
through environ and unsetenv()ing everything would work too, but it
feels annoyingly slow for such a simple operation.

--=-P5dWbwhPQ5WN/kDDEBIO
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQBITXk2yUhSUUBViskRAqQaAKCHRzyGcbn6gvwoE+WnEhOcs4yvMACgkrsT
QNcYAgT8cy1CMbc/dq3VBTk=
=FPt5
-----END PGP SIGNATURE-----

--=-P5dWbwhPQ5WN/kDDEBIO--




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