Subject: | fork() breaks in Windows |
Date: | Tue, 12 Feb 2019 16:03:22 -1000 |
To: | bug-Test-Class [...] rt.cpan.org |
From: | Felipe Gasper <felipe [...] felipegasper.com> |
-----
#!/usr/bin/env perl
use strict;
use warnings;
use autodie;
use parent qw( Test::Class );
sub test_fork : Tests() {
my $pid = fork or do {
exit;
};
waitpid $pid, 0;
}
__PACKAGE__->new()->runtests() if !caller;
-----
^^ The above breaks in Windows. It gives the following error:
-----
#
# main->test_fork
Free to wrong pool 2db2a30 not 22829c0 at t/tcbug.pl line 11.
at t/tcbug.pl line 10.
Test::Class::_run_method(main=HASH(0x2f98a68), "test_fork", ARRAY(0x30ae5f8)) called at C:/Strawberry/perl/site/lib/Test/Class.pm line 402
Test::Class::runtests(main=HASH(0x2f98a68)) called at t/tcbug.pl line 17
Dubious, test returned 5 (wstat 1280, 0x500)
No subtests run
Test Summary Report
-------------------
t/tcbug.pl (Wstat: 1280 Tests: 0 Failed: 0)
Non-zero exit status: 5
Parse errors: No plan found in TAP output
Files=1, Tests=0, 2 wallclock secs ( 0.05 usr + 0.00 sys = 0.05 CPU)
Result: FAIL
-----
I don’t have a fix at this time.
-FG