Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/lib/libc/stdlib

In article <>,
Matthias Scheler  <> wrote:
>On Thu, Sep 30, 2010 at 03:35:41PM +0200, Nicolas Joly wrote:
>> That may be part of the problem (at least for zsh 4.2).
>> >From the OpenGroup function description; this function does not copy
>> the provided string, but use it directly instead. It's the caller
>> responsability to clean it when not in use anymore.
>I see.
>> zsh 4.2 seems to follow this and try to deallocate the previous
>> variable string when it has been replaced by a new one. But our
>> putenv, which calls setenv, has already done the same ...
>So it assumes that it gets back from getenv(3) exactly what it passed
>into putenv(3). Well, it seesm our putenv(3) needs a rewrite.
>I think that setenv(3) and unsetenv(3) are correct as they are.

Well, if you fix putenv, please move the saveenv realloc environ code
in __allocenv() so it is not in two places...


Home | Main Index | Thread Index | Old Index