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

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.

-Craig


Comment on Re^2: Can I do this ???
Download Code
Replies are listed 'Oldest First'.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (15)
As of 2015-07-07 16:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (91 votes), past polls