summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiroo Hayashi <hiroo.hayashi@computer.org>2014-04-07 10:33:17 -0400
committerRicardo Signes <rjbs@cpan.org>2014-07-11 21:20:21 -0400
commitc3277d6aafdfde88df3e30a8a4dba20bf3ad1437 (patch)
tree841a54194d7a9ccd6d2bc281c2144a9ee28ffafd
parent0e7dab7477c04c0e23a6d998505a40960eb803cd (diff)
downloadperl-c3277d6aafdfde88df3e30a8a4dba20bf3ad1437.tar.gz
properly reset ReadLine's knowledge of handles after pager
[perl #121456] (cherry picked from commit 9b534162be6678b2eeb735f49ab72accc64255fb)
-rw-r--r--lib/perl5db.pl3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/perl5db.pl b/lib/perl5db.pl
index da532fb304..c2921d7390 100644
--- a/lib/perl5db.pl
+++ b/lib/perl5db.pl
@@ -2418,6 +2418,9 @@ sub _DB__at_end_of_every_command {
open( OUT, ">&SAVEOUT" ) || _db_warn("Can't restore DB::OUT");
}
+ # Let Readline know about the new filehandles.
+ reset_IN_OUT( \*IN, \*OUT );
+
# Close filehandle pager was using, restore the normal one
# if necessary,
close(SAVEOUT);