|Welcome to the Monastery|
Proposal how to make modules using fork more portableby Anonymous Monk
|on Mar 30, 2011 at 09:47 UTC||Need Help??|
Hej, this is my first post to so have some forgiveness!
I have used Perl for more than 20 years, but I am quit new to installing from CPAN using the cpan-utility.I am using:
After some restarts and using force to inhibit the tests I succeeded to install Padre and Dancer.
During all my tries the test of Test::TCP seemed to be a problem, so I started trying to find the cause of blocking of the tests. Sometimes I was using Padre, but in many cases it also blocked. Sometimes Padre even was impossible to kill, so I had to restart Windows.
After a lot of tries I wrote: https://rt.cpan.org/Public/Bug/Display.html?id=66437. See also https://rt.cpan.org/Public/Bug/Display.html?id=66016.
To add an advice to make forked processes shut down themselves, by the implementation of modules intended to be portable. The purpose with this is to avoid the related problem in the emulation of fork in Windows, using kill.
In the documentation of fork there could be a warning about the problem and an reference to perlfork http://perldoc.perl.org/perlfork.html.
In perlfork there should be an advice to make forked processes shut down themselves. The purpose of this is to avoid using kill(9, $child).
Using kill(9, $child) in Windows, where fork is emulated in the perl interpreter, there is a probability to get a blocked process.
Work is going on to improve the perlfork implementation in Windows (see: http://www.gossamer-threads.com/lists/perl/porters/261805), but it will take a long time until the new versions of Perl are used in all places.