From: Brendan O'Dea Date: Sat, 8 Jul 2006 13:27:50 +0000 (+1000) Subject: perl5db.pl: read full lines from remote socket X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a85de320567e6b52924437e70474cca952dbf2be;p=p5sagit%2Fp5-mst-13.2.git perl5db.pl: read full lines from remote socket Message-ID: <20060708032750.GA20454@londo.c47.org> p4raw-id: //depot/perl@28510 --- diff --git a/lib/perl5db.pl b/lib/perl5db.pl index b4edc83..60f36da 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;