Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [BUG/PATCH] setup: Copy an environment variable to avoid overwrites

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:55:39

Junio C Hamano [off-list ref] writes:
...  So even if the standard allowed the
returned value to be volatile across calls to getenv(3),...
...
In fact,

    http://pubs.opengroup.org/onlinepubs/9699919799/functions/getenv.html

says that only ...
Apparently I wasn't even reading what I was quoting carefully
enough.  The above does include getenv() as one of the functions
that are allowed to invalidate earlier return values.

Sorry about that.  I'll go back to bed (I am a bit under the weather
and OOO today).  The conclusion in my original message is still
valid.
Having said that, we do have codepaths to update a handful of
environment variables ourselves (GIT_DIR is among them), so I think
your patch is a good safety measure in general.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help