in reply to How is %ENV copied by child processes ?

The "copying" of a fork happens at a very low level, outside of user code space. You just end up with cloned pages.

To change the %ENV of a child process, you have to do the fork yourself, then change the env before you exec the actual item. A skeleton of this looks like what I just posted in open-coding a system() operation.

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.

  • Comment on •Re: How is %ENV copied by child processes ?

Replies are listed 'Best First'.
Re^2: How is %ENV copied by child processes ?
by Pardus (Pilgrim) on Apr 21, 2003 at 18:56 UTC
    I thought of that option but I wanted to it make a module that could be used transparently. Considering the number of ways a perl program can be forked this won't be do-able :((
    At least not without custom fork/system/.. routines.

    Well back to use Env; for me.
    --
    Jaap Karssenberg || Pardus (Larus)? <pardus@cpan.org>
    >>>> Zoidberg: So many memories, so many strange fluids gushing out of patients' bodies.... <<<<