summaryrefslogtreecommitdiff
path: root/lib/perl5db.pl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/perl5db.pl')
-rw-r--r--lib/perl5db.pl10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/perl5db.pl b/lib/perl5db.pl
index b4edc83819..60f36da4a5 100644
--- a/lib/perl5db.pl
+++ b/lib/perl5db.pl
@@ -6354,9 +6354,13 @@ sub readline {
$OUT->write( join( '', @_ ) );
# Receive anything there is to receive.
- my $stuff;
- $IN->recv( $stuff, 2048 ); # XXX "what's wrong with sysread?"
- # XXX Don't know. You tell me.
+ $stuff;
+ my $stuff = '';
+ my $buf;
+ do {
+ $IN->recv( $buf = '', 2048 ); # XXX "what's wrong with sysread?"
+ # XXX Don't know. You tell me.
+ } while length $buf and ($stuff .= $buf) !~ /\n/;
# What we got.
$stuff;