Perl: the Markov chain saw | |
PerlMonks |
Waitpid does not work as expected in Windowsby athanasia (Pilgrim) |
on Sep 29, 2008 at 10:36 UTC ( [id://714300]=perlquestion: print w/replies, xml ) | Need Help?? |
athanasia has asked for the wisdom of the Perl Monks concerning the following question:
Hi monks!
I am using ActivePerl-5.8.8 in a Windows XP OS.
I want to do a simple fork and exit parent when child returns. The problem is that waitpid() never seems to return something other than 0 and the program hangs with the error message "Perl Command Line Interpreter has encountered an error and needs to close". I have seen several posts questioning Perl's ability to fork correctly in Windows systems. I would appreciate any help. I am posting my code: The output I am getting is : I am the parent Waitpid returned 0 I am the child Not yet caught Waitpid returned 0 Not yet caught Waitpid returned 0 Not yet caught Waitpid returned 0 Child is exiting Not yet caught Waitpid returned 0 Not yet caught Waitpid returned 0 ...
Back to
Seekers of Perl Wisdom
|
|