Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re^2: Can I do this ???

by cmv (Chaplain)
on Jan 22, 2009 at 18:09 UTC ( #738244=note: print w/ replies, xml ) Need Help??

in reply to Re: Can I do this ???
in thread Can I do this ???

grinder++ I agree with you, that parents cooperating with children can cause a change in the parents environment. Hey, that probably holds true in real life as well...

My contribution here is that I implemented something similar, using unix signals. The parent would trap on an unused signal (I used SIGUSR1) and read-in-and-execute all the commands contained in a pre-defined temporary file.

When the child wanted to change something in the parents environment, it would write those changes to the pre-defined temporary file, then would poke-the-parent-in-the-side by sending a signal via the unix kill(1) command.

This worked well for me.


Comment on Re^2: Can I do this ???
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (7)
As of 2015-12-01 02:06 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (791 votes), past polls