Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

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

by merlyn (Sage)
on Apr 21, 2003 at 17:58 UTC ( [id://252074]=note: print w/replies, xml ) Need Help??


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.

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.... <<<<

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://252074]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2024-03-28 23:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found