Lines 183-189
Link Here
|
183 |
my $s = IO::Select->new($fh{'STDOUT'}, $fh{'STDERR'}); |
183 |
my $s = IO::Select->new($fh{'STDOUT'}, $fh{'STDERR'}); |
184 |
|
184 |
|
185 |
my $t0 = time; |
185 |
my $t0 = time; |
186 |
my %buf; |
186 |
my %buf = (STDOUT => '', STDERR => ''); |
187 |
while (1) { |
187 |
while (1) { |
188 |
|
188 |
|
189 |
my @ready = $s->can_read(); |
189 |
my @ready = $s->can_read(); |
Lines 193-203
Link Here
|
193 |
my $pipename = $h2p{"$ready"}; |
193 |
my $pipename = $h2p{"$ready"}; |
194 |
if ($ready->eof) { |
194 |
if ($ready->eof) { |
195 |
$s->remove($ready); |
195 |
$s->remove($ready); |
196 |
last unless ($s->count); |
|
|
197 |
} else { |
196 |
} else { |
198 |
$ready->read($buf{$pipename}, BLKSIZE, length($buf{$pipename})); |
197 |
$ready->read($buf{$pipename}, BLKSIZE, length($buf{$pipename})); |
199 |
} |
198 |
} |
200 |
} |
199 |
} |
|
|
200 |
last unless ($s->count); |
201 |
|
201 |
|
202 |
} |
202 |
} |
203 |
|
203 |
|