It doesn't look like you're handling partial reads
He does. Relevant code:
while(my @ready = $select->can_read) { ... my $data; my $length = sysread $fh, $data, 4096; ... $processeddata .= $data; ... }
All the data ends up in processeddata, no matter how much is read by a given call to sysread.
It doesn't look like you're handling ... other exceptional conditions
He does this too. Relevant code:
if( ! defined $length || $length == 0 ) { $err .= "Error from child: $!\n" unless defined $length; $select->remove($fh); }
The filehandle is removed from the list of handles monitored by select. I'm guessing can_read will return false when it no longer monitors any handles.
Something like this might be a start.
That's bad! You removed select, which is cruicial here.
In reply to Re^2: I got IPC::Open3 to work!
by ikegami
in thread I got IPC::Open3 to work!
by harleypig
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |