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

Re: [PATCH] Safer environ iteration

Thread Previous | Thread Next
From:
Rafael Garcia-Suarez
Date:
August 24, 2008 08:24
Subject:
Re: [PATCH] Safer environ iteration
Message ID:
b77c1dce0808240824j20c8efc9q7aaf0f1d0ea80b78@mail.gmail.com
2008/8/6 Milosz Tanski <mtanski@gridapp.com>:
[...]
> 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


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About