summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBrendan O'Dea <bod@debian.org>2006-07-08 23:27:50 +1000
committerSteve Peters <steve@fisharerojo.org>2006-07-08 17:51:43 +0000
commita85de320567e6b52924437e70474cca952dbf2be (patch)
tree1f616583f95d0c80cf6fe33ea456b3d6550455e4 /lib
parent25441cc966e874fb78f3eb1adaf7caf0c559a959 (diff)
downloadperl-a85de320567e6b52924437e70474cca952dbf2be.tar.gz
perl5db.pl: read full lines from remote socket
Message-ID: <20060708032750.GA20454@londo.c47.org> p4raw-id: //depot/perl@28510
Diffstat (limited to 'lib')
-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;