Hello dchidelf, and welcome to the monastery.
The following resolves the issue for me. Basically, I'm able to iterate through the loop 20 times. It looks like the *tied* $out and $err handles are not being garbage collected by Perl. Thus, likely memory leaking.
Add a CLOSE method to the IOQueue package.
sub CLOSE { undef $_[0]; }
Inside the test script, close $out and $err handles before calling $p->close().
print "LOOP DONE\n"; close $out; close $err; $p->close();
The above passes on a Windows 7 VM with Strawberry Perl 5.14.x, 5.16.x, 5.18.x, 5.20.x, and 5.22.x. You may already know this, but $^X is a special variable in Perl. It provides the path for the Perl interpreter.
# my $p = ProcOpen::procopen(\$in, \$out, \$err, "c:\\perl\\bin\\perl. +exe", "testpipe.pl"); my $p = ProcOpen::procopen(\$in, \$out, \$err, $^X, "testpipe.pl");
Your *cool* module is interesting.
Regards, Mario
In reply to Re: Having Win32 Perl crashs using ithreads
by marioroy
in thread Having Win32 Perl crashs using ithreads
by dchidelf
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |