On Fri, 19 Nov 1999, M.J.T. Guy wrote: > Nick Ing-Simmons <nik@tiuk.ti.com> wrote > > Thus as far as I can see unless we keep a hash of "things we malloc'ed" > > and check for match we should not free() anything in environ. > > Exactly. And therefore, since we don't want memory leaks, we must > keep a hash. You just have to be careful about that when you're embedding perl in another application that changes the environment. One problem is that using perl malloc to create your hash will cause all sorts of bad things, because the enviroment ends up being allocated by perl's malloc which prevents the embedding application (which don't use perl malloc) to do any further putenv's. Another problem (which is biting me :-( is that the practice of assigning a new value to __environ (which is what you do when you create your hash) seems to break on IRIX 6.2 using SGI's newest compiler (7.3) :-( Rasmus ----------------------------------------------------------------------------- Rasmus Tamstorf (tamstorf@fa.disney.com) If you can dream it you can do it ! Walt Disney Feature Animation - Walt Disney -----------------------------------------------------------------------------