in reply to Re: How I'm sure syswrite has finished?
in thread How I'm sure syswrite has finished?
But the behavior is the same.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;
Only the sleep seems to work.
My guess is that
produces a "fake termination": the local process ends while the remote is still writing?$pm->finish;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: How I'm sure syswrite has finished?
by perl5ever (Pilgrim) on Mar 16, 2009 at 05:16 UTC |