Environment clearing broken in 7.0
Timo Sirainen
tss at iki.fi
Mon Jun 9 19:02:21 UTC 2008
I think clearing environment using:
environ[0] = 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]=NULL, putenv() -> everything is
visible again). Was this change intended, or will this be fixed?
Looks like I could work around this by using:
environ = 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20080609/38074106/attachment.pgp
More information about the freebsd-stable
mailing list