Philip Montgomery wrote:

> I am trying to figure out how to run process concurrently from Perl.  I
> want the parent to spawn off the children and wait until they are complete
> to continue.  I can get the child processes to run in serial, but I need
> them to run in parallel.
> 
> The code I am using thus far is
> 
> for ($x;$x<4;$x++) {
>     if ($pid=fork) {
>     } else {
>    system "mkdir dir$x";
>     for ($i=1;$i<250;$i++) {
>         open3(OUTPUT, INPUT, ERRORS, cd dir$x;make clean; make all);
>         <code to process the output of the make commands and store into
>         log files>

you are forking a child, do a system() call, and execute some more code. 
depends on what the "<code to process ...>" portion is, your child process 
might(if it doesn't exit) goes back to the for loop and start to fork it's 
own child. is that what you want?

david

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

Reply via email to