Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: How to optionally kill a child, and capture status if not killed.

by zentara (Archbishop)
on Apr 26, 2008 at 15:28 UTC ( #683057=note: print w/replies, xml ) Need Help??


in reply to How to optionally kill a child, and capture status if not killed.

If you need alot of communication between process, you might be better off using threads and shared variables. The drawback to threads is that it may retain system resources (gain ram) if not done properly. A neat way to avoid that, is to make a thread to do your forking. You can then detect the status of the forked process( running, finished, returned errors, ets) in the thread, and stuff them in shared variables( with the pid of the forked process), so you can kill it from the main thread whenever you want. You can reuse the launcher thread, and pass in strings to be eval'd and forked off.

I'm not really a human, but I play one on earth. Cogito ergo sum a bum
  • Comment on Re: How to optionally kill a child, and capture status if not killed.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://683057]
help
Chatterbox?
[erix]: job hunting is an annoying situation to be in. Of course, once settled somewhere you're going to want out again...
[erix]: but that doesn't make the searching less anoying
[Tanktalus]: I've been looking for over 12 months :(
[erix]: that's bad... I can only wish you good luck

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2017-05-23 19:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?