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



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).
> 
> http://www.opengroup.org/onlinepubs/009695399/functions/putenv.html
> 
> >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.

        Kind regards

-- 
Matthias Scheler                                  http://zhadum.org.uk/


Home | Main Index | Thread Index | Old Index