I tried 0.3 on Activestate 5.8.8. It does not work.
During the "nmake test", the Perl Command Line Interpreter crashes, and
so I click on the button that wants me to tell Microsoft about the problem.
I tried it three times. Same thing. The crash window pops up with this
paste showing:
--------------paste
C:\aaa\Proc\Proc-Fork-0.3>nmake test
Microsoft (R) Program Maintenance Utility Version 7.00.9466
Copyright (C) Microsoft Corporation. All rights reserved.
C:\perl\bin\perl.exe "-MExtUtils::Command::MM" "-e"
"test_harness(0, 'blib\lib', 'blib\arch')" t\00.mo
ck.t t\01.real.t t\pod-coverage.t t\pod.t
t\00.mock.........ok
t\01.real.........ok 1/3
-------------end paste
After I click the pop up crash window to make it go away, the command
prompt window looks like this:
-------------------paste
C:\aaa\Proc\Proc-Fork-0.3>nmake test
Microsoft (R) Program Maintenance Utility Version 7.00.9466
Copyright (C) Microsoft Corporation. All rights reserved.
C:\perl\bin\perl.exe "-MExtUtils::Command::MM" "-e"
"test_harness(0, 'blib\lib', 'blib\arch')" t\00.mo
ck.t t\01.real.t t\pod-coverage.t t\pod.t
t\00.mock.........ok
t\01.real.........dubious
Test returned status 5 (wstat 1280, 0x500)
DIED. FAILED tests 2-3
Failed 2/3 tests, 33.33% okay
t\pod-coverage....skipped
all skipped: Set the POD_TESTS environment variable to run these
tests
t\pod.............skipped
all skipped: Set the POD_TESTS environment variable to run these
tests
Failed Test Stat Wstat Total Fail List of Failed
-------------------------------------------------------------------------------
t\01.real.t 5 1280 3 4 2-3
2 tests skipped.
Failed 1/4 test scripts. 2/17 subtests failed.
Files=4, Tests=17, 22 wallclock secs ( 0.00 cusr + 0.00 csys = 0.00 CPU)
Failed 1/4 test programs. 2/17 subtests failed.
NMAKE : fatal error U1077: 'C:\perl\bin\perl.exe' : return code '0xff'
Stop.
----------------end paste
I saved one of the files that gets sent to Microsoft. I am not pasting
it here because it is 12K bytes. It is an XML file. I'll post it if
you want me to.
If it helps, the windows fork itself does work. Here is some code that
does a pretty good test of parent/child stuff, with an unnecessary
subroutine call by the child just to flex things a touch.
------------paste fork test
#!/usr/bin/perl -w
# file: test_windows_fork_02.pl
# 1. Have the children take longer than the parent will allow.
# 2. Have the children finish within the parent's allotted time limit.
sub sleeper {
my ($sleep_time) = @_;
sleep($sleep_time);
}
my $done = 0;
my $count = 0;
while (!($done)) {
$count++;
print "105: count $count\n";
#...........................................
if (my $pid = fork()) { # Parent
print "115: count $count\n";
select(undef, undef, undef, 1.00);
kill 9, $pid;
$done = 1 if ($count == 3);
print "115: count $count\n";
}
elsif(defined $pid) { # Child
print "205\n";
sleeper(40);
exit;
} else {
# Failed to fork
print "Failed to fork:$!:\n";
exit;
}
#...........................................
print "510\n";
}
print "610\n";
#...........................................
if (my $pid = fork()) { # Parent
print "705: \n";
select(undef, undef, undef, 4.00);
kill 9, $pid;
}
elsif(defined $pid) { # Child
print "805\n";
sleeper(2);
print "810\n";
exit;
} else {
# Failed to fork
print "820: Failed to fork:$!:\n";
exit;
}
#...........................................
print "910\n";
------------end paste fork test
Aristotle Pagaltzis via RT wrote:
Show quoted text> <URL:
http://rt.cpan.org/Ticket/Display.html?id=23893 >
>
> Proc::Fork 0.11 is long obsolete; please try version 0.3.
>
> Since 0.3 seems to crash Strawberry Perl 5.8.8, I would appreciate
> if you could test it on ActivePerl to see if it works there.
>
>