Subject: | extractMembers failing across fork on Windows |
Calling extractTree in the child 'process' - which is obtained after
doing a 'fork', doesn't work in Windows XP.
It does work if no fork business is happening so something special with
the fork semantics on Windows (it's really a thread - not a process).
Subject: | unzip_fork.pl |
use strict;
use Archive::Zip qw(:ERROR_CODES);
my $child = fork();
if ($child == 0) {
my $path = q[c:/temp/raw-data/one-hundred-claims.zip];
chdir (q[c:/temp]);
my $z = Archive::Zip->new;
die "failed to read\n" unless $z->read($path) == AZ_OK;
die "failed to extract\n" unless AZ_OK == $z->extractTree();
exit;
}