153 foreach (@str_handles) {
154 my $pid = $pm->start and next;
155
156 $b = syswrite $_->{handle},
157 join(" ",
158 $_->{chunksize},
159 $_->{A_cols},
160 @A_lines[$_->{start}.. $_->{end}],
161 @B_lines,
162 "\cN"
163 );
164 # Wait until the writing has finished
165 #sleep(1);
166 $pm->finish;
167 }
168 $pm->wait_all_children;
But the behavior is the same.
Only the sleep seems to work.
My guess is that
$pm->finish;
produces a "fake termination": the local process ends while the remote is still writing?
|