in reply to Main program exits even before the child process completes on windows

Why are you calling exec in your child ?

An alternative approach may be to use Parallel::ForkManager. then your code could look something like this

my $pm = new Parallel::ForkManager(10); for my $count (1..10) { $pm->start and next; # do the fork sub1($count,$lines,\@cna); $pm->finish; # do the exit in the child process } $pm->wait_all_children;
  • Comment on Re: Main program exits even before the child process completes on windows
  • Download Code