in reply to Re: I got IPC::Open3 to work!
in thread I got IPC::Open3 to work!
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: I got IPC::Open3 to work!
by siracusa (Friar) on Jul 23, 2005 at 12:36 UTC | |
by harleypig (Monk) on Jul 24, 2005 at 16:04 UTC |