more useful options | |
PerlMonks |
Re: Can I run a piece of code like child process?by Eradicatore (Monk) |
on Jun 06, 2001 at 20:02 UTC ( [id://86283]=note: print w/replies, xml ) | Need Help?? |
From what I've experienced and researched so far on win32 and NT is that its easiest maybe to use fork. From what I can tell, fork on win32 is like a hybrid between a true fork and a thread. It doesn't create a new seperate process as seen by the task manager, but it also does not have access to global variables in the parent like a thread should.
My example shows how to use fork together with Tk to get web pages but not interfere with the gui. The child just sits there waiting for urls to get. You will have to add proxy support if you're behind a firewall though. Oh, also, you want to make sure you download the right version of perl that supports fork. You can get this from active state at here
Justin Eltoft "If at all god's gaze upon us falls, its with a mischievous grin, look at him" -- Dave Matthews
In Section
Seekers of Perl Wisdom
|
|