Permalink
Browse files

[rt.cpan.org 24956] Set STDIN blocking. Large amounts of STDOUT data

will overrun terminal buffers if STDIN is non-blocking.  Weird!
  • Loading branch information...
1 parent aff59f9 commit 8d0754d2c3c7313a92a2a40a0e4f8b42fc43cd7b @rcaputo committed Jan 1, 2010
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/POE/Wheel/ReadLine.pm
@@ -1063,8 +1063,11 @@ sub get {
$self->[SELF_UNDO] = [];
$self->[SELF_LAST] = '';
- # Watch the filehandle.
+ # Watch the filehandle. STDIN is made blocking to avoid buffer
+ # overruns when put()ing large quantities of data.
+ # TODO - Why does it matter to STDOUT whether STDIN is blocking?
$poe_kernel->select($stdin, $self->[SELF_STATE_READ]);
+ $stdin->blocking(1);
my $sp = $prompt;
$sp =~ s{\\[\[\]]}{}g;

0 comments on commit 8d0754d

Please sign in to comment.