I get the following error when I try to open the 65th child process in windows:
open3: IO::Pipe: Can't spawn-NOWAIT: Resource temporarily unavailable
How do I open more than 64 child processes on windows using IPC::Open3 in perl?
The following code works fine in linux but fails with the above error on windows:
use POSIX qw[ :sys_wait_h ];;
use IPC::Open3;
use Carp;
use FileHandle;
my $i = 0;
while ($i < 300){
my($IN) = new FileHandle;
my($OUT) = new FileHandle;
my($ERR) = new FileHandle;
$IN->autoflush(1);
$ERR->autoflush(1);
my($childpid) = IPC::Open3::open3($IN, $OUT, $_ERR, "<xyz process>") or
Carp::confess("/n=====$i=======/nCould not open pipe");
waitpid( $childpid, &WNOHANG);
$ASPELL_IN->close();
$ASPELL_OUT->close();
kill(0,$childpid);
}