------- Original message -------
From: Ignaz Birnstingl <ign...@gmail.com>
Now if I use APR
(pseudo code)
char *foo = apr_env_get("foo");
char *bar = apr_env_get("bar");
if apr_env_get would pstrdup the string returned by getenv I could
compare foo with bar, like this if (strcmp(foo, bar) == 0) ...
That is not necessarily true either. Suppose another thread called
getenv("foo") just after getenv() and before strdup() in apr_env_get() of
your thread. You would then get "foo" in your copy as well, because you'd
be copying that same static buffer.
--
Bojan