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

Re^3: getting values from child process

by eyepopslikeamosquito (Archbishop)
on Nov 10, 2010 at 11:51 UTC ( [id://870559]=note: print w/replies, xml ) Need Help??


in reply to Re^2: getting values from child process
in thread getting values from child process

No file method wont work.
Yes file method will work. :) The parent knows the pid of the child that just exited from the return value of wait. If each child writes the value of the PROJECTNAME "environment variable" just before it exits (you still haven't explained why it has to be an environment variable) to a file (pid.tmp, say), the parent can read the value of PROJECTNAME from the pid.tmp file.

You still haven't explained the bigger picture, what is the type of problem you are trying to solve, and why running multiple sub processes is a good way to solve it. And do you really need environment variables? Or do you just need a decent IPC mechanism?

  • Comment on Re^3: getting values from child process

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (6)
As of 2024-04-23 08:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found