diff options
author | Brendan O'Dea <bod@debian.org> | 2006-07-08 23:27:50 +1000 |
---|---|---|
committer | Steve Peters <steve@fisharerojo.org> | 2006-07-08 17:51:43 +0000 |
commit | a85de320567e6b52924437e70474cca952dbf2be (patch) | |
tree | 1f616583f95d0c80cf6fe33ea456b3d6550455e4 /lib | |
parent | 25441cc966e874fb78f3eb1adaf7caf0c559a959 (diff) | |
download | perl-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.pl | 10 |
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; |