Hi All,

I'm hoping someone has done this before.  I need to spawn 3 processes and
then wait for all three to finish.

spawn like this:
      my $obj;
      my $appname = $perl;
      my $cmdline = "$deliverscript $arg";
      my $iflags = 1;
      my $cflags = CREATE_NEW_CONSOLE | NORMAL_PRIORITY_CLASS;
      my $curdir = $localdir{$filetype};

      my $Result1 = Win32::Process::Create(
$obj1,$appname,$cmdline,$iflags,$cflags,$curdir );
      my $Result2 = Win32::Process::Create(
$obj2,$appname,$cmdline,$iflags,$cflags,$curdir );
      my $Result3 = Win32::Process::Create(
$obj3,$appname,$cmdline,$iflags,$cflags,$curdir );

but how can I tell when all three are finished?  If I use
      $obj1->Wait(INFINITE);
      $obj2->Wait(INFINITE);
      $obj3->Wait(INFINITE);

what happens if $obj2 finishes before $obj1?

is there a way to check and see if a process ($obj1,$obj2,$obj3) is still
running?  Then I could try something like:
      while (1){
            if ($obj->status and $obj->status and $obj->status) {last;}
            sleep (.2);
      }

TIA,
Peter





-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to