develooper Front page | perl.perl5.porters | Postings from August 2008

Re: [PATCH] Safer environ iteration

Thread Previous | Thread Next
Rafael Garcia-Suarez
August 24, 2008 08:24
Re: [PATCH] Safer environ iteration
Message ID:
2008/8/6 Milosz Tanski <>:
> I attached a patch that makes a copy of *env before each iteration
> instead of dereferencing env at every single operation. This relies on
> the agreed upon behavior to never free any memory allocated for vars in
> environ, just dropping the old values on the floor (and it'll get freed
> exit) when replacing an element of environ. This is the behavior for
> putenv/setenv on Linux, Solaris and HP-UX and possibly others. While
> this won't fix the issue on systems that don't conform to this behavior
> but it'll work a lot better in the corner cases on those systems that
> handle it properly.

Thanks, I applied this patch to bleadperl as change #34225.

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About