in reply to How to set pipe first and then use the forkmanager?
I think I must establish 4 pipes first(right?),
Why? Why not fork first and have each fork establish its own pipe?
Untested example:
for my $file ( @data_files ) { $pm->fork and next; open my $h, "| ...." or die $!; print $h ...; ... $pm->finish; } $pm->wait;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to set pipe first and then use the forkmanager?
by mlin (Novice) on Sep 22, 2016 at 10:51 UTC | |
by Laurent_R (Canon) on Sep 22, 2016 at 14:57 UTC | |
by mlin (Novice) on Sep 23, 2016 at 09:57 UTC | |
by Laurent_R (Canon) on Sep 23, 2016 at 11:39 UTC |