diff options
-rw-r--r-- | t/basic.t | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -68,14 +68,17 @@ fail if length($current_frame_data); fail if $current_frame_idx != 3; sub full_read { - my ($pty) = @_; + my ($fh) = @_; - my $select = IO::Select->new($pty); + my $select = IO::Select->new($fh); return if $select->has_exception(0.1); + 1 while !$select->can_read(1); + my $ret; while ($select->can_read(1)) { - my $new = $pty->read; + my $new; + sysread($fh, $new, 4096); last unless defined($new) && length($new); $ret .= $new; return $ret if $select->has_exception(0.1); |