diff options
Diffstat (limited to 't/callbacks.t')
-rw-r--r-- | t/callbacks.t | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/t/callbacks.t b/t/callbacks.t index 250fec7..5a8f17d 100644 --- a/t/callbacks.t +++ b/t/callbacks.t @@ -111,14 +111,17 @@ alarm 60; } 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); |