in reply to Having Win32 Perl crashs using ithreads
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Having Win32 Perl crashs using ithreads
by dchidelf (Novice) on Feb 18, 2016 at 21:11 UTC | |
by marioroy (Prior) on Feb 19, 2016 at 00:17 UTC | |
by dchidelf (Novice) on Feb 19, 2016 at 18:06 UTC | |
by marioroy (Prior) on Feb 19, 2016 at 22:14 UTC |