On Fri, Nov 19, 1999 at 01:37:35AM +0100, Joerg Schumacher wrote: > > a) Perl uses PL_origenviron variable to understand when environ is malloc()ed. > > > > You do not claim that this scheme is broken (though AFAICS, it will > > work correct only if perl_parse is called only once). > > On the contrary: I do believe that the check > > (environ == PL_origenviron) /* need we copy environment? */ > > is broken. This test would only be OK if perl itself could guarantee > that no extension module modifies environ behind the scene. I do not believe this. At least the documentation I see states that putenv() will malloc() environ if it needs to modify it. Thus with usemymalloc=n the test is OK as is. Ilya