in reply to Re: IO::Select - is it right for this?
in thread IO::Select - is it right for this?
Problem is, and it's the same when forking, that the parent can't see @out. Should I move the $out[$i] .= $_; to the parent process? The forked processes work fine, and fairly quickly, but I need to get the child to tell the parent what it found.for ($i=0; $i<`#of children to do`; $i++;) { $pid[$i]= open($created_file_handle, "$custom_call_statement -|"); if ($pid[$i]) { waitpid($pid[$i], 0); } # parent waits for child to + finish } else { while (<$created_file_handle>) { $out[$i] .= $_; } # add outpu +t to the array exit; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: IO::Select - is it right for this?
by Skeeve (Parson) on Oct 21, 2003 at 11:20 UTC | |
by mcogan1966 (Monk) on Oct 21, 2003 at 14:16 UTC | |
by mcogan1966 (Monk) on Oct 21, 2003 at 17:17 UTC | |
by Skeeve (Parson) on Oct 22, 2003 at 08:05 UTC | |
by mcogan1966 (Monk) on Oct 22, 2003 at 12:44 UTC | |
|