|
|
| "be consistent" | |
| PerlMonks |
Re: pipe fork win32by Marshall (Prior) |
| on Aug 26, 2012 at 04:03 UTC ( #989782=note: print w/ replies, xml ) | Need Help?? |
|
This Windows fork() is a weird thing, because it uses threads to emulate what a Unix fork() would do. I tried to write a simple scenario, but ran into problems with sleep(). My 'work-around' in the child process is not efficient, but it appears to work on Win XP, Perl 5.10.1. I'd like to know a bit more about the application... The parent can send various flavors of "kill" to the child (you know its process id - and "kill" is basically a one bit message) and the child can have a signal handler to intercept this and figure out what to do. I don't see the need for any kind of "read" operation between the parent and the child, but maybe I don't understand what you need. BrowserUk knows way more about communication between Windows threads than I do, but it doesn't sound like that is required? Setting up an IP connection between the client and the parent is possible, but I'm not sure of the need for that. This is not a "server" it just forks a single child. More complex scenarios are possible.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||||||||||||||