I have been trying to spawn child processes on MAC osx 10.4.2 for the last 
week and a half. I have been unsuccessful. I can do it on Winblows using 
system and start. is there an equivalent on posix???

thanks in advance for the help

relevant code section:

if($load){
  # deal with load (if needed) before starting test
  my $prcss=1;
  while($load>$prcss){
    ## system moves forward until the returnis needed, doing the system
    ## command in a sub-process. since no return is needed here the
    ## system command is used to spawn load-1 child processes

    my $ldcmd='';

    # start with minimum needed arguments
    unless($posix){
#      $ldcmd="start perl $0 -code $prcss -log $log"; # pl command line
      $ldcmd="start $0 -co $prcss -log $log"; # exe command line
    }else{
      # start isnt in posix, how do we launch it independently?
#      $ldcmd="perl $0 -code $prcss -log $log"; # pl command line
      $ldcmd="$0 -co $prcss -log $log";
    }

    # add others that are set
    if($size){ $ldcmd.=" -fi $size"; }
    if($unch){ $ldcmd.=" -unc-l $unch -unc-u $uncu -unc-p $uncp -unc-d 
$udir"; }
    if($iter){ $ldcmd.=" -it $iter"; }
    if($posix){ $ldcmd.=" -posi -pos-u $posu -pos-p $posp -pos-l $posl"; }
    if($msubs && $usubs)
      { $ldcmd.=" -mk -use -sub $maxlvl -dir $dpl"; }
    elsif($usubs)
      { $ldcmd.=" -use -sub $maxlvl -dir $dpl"; }
    elsif($msubs)
      { $ldcmd.=" -mk -sub $maxlvl -dir $dpl"; }
    if($lcl){ $ldcmd.=" -loc -ls $ldir"; }

    system "$ldcmd";
    &rep("Spawned chiled process ($prcss) for load testing\n\t via 
command: $ldcmd",$verb);
    $prcss++;
  }
}
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to