-
Notifications
You must be signed in to change notification settings - Fork 550
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
perl5db.pl does not set new filehandles into ReadLine after pager command #13671
Comments
From hiroo.hayashi@computer.orgCreated by hiroo.hayashi@computer.orgperl5db.pl does not set new file-handles into ReadLine after pager When the pager command (| or ||) is used in perldb, it overwrites the OUT From http://search.cpan.org/~rjbs/perl-5.18.2/lib/perl5db.pl#reset_IN_OUT In reset_IN_OUT() Term::ReadLine:newTTY() is called. The perl implementations of Term::ReadLine (Term::ReadLine::Stub or Attached are the patches for Perl Info
|
From hiroo.hayashi@computer.orgperl5db-1.37_in5.16.3.diff*** perl5db.pl.org Mon Mar 17 22:17:34 2014
--- perl5db.pl Tue Mar 18 01:01:22 2014
***************
*** 3316,3321 ****
--- 3316,3324 ----
open( OUT, ">&SAVEOUT" ) || &warn("Can't restore DB::OUT");
}
+ # Let Readline know the new filehandles.
+ reset_IN_OUT( \*IN, \*OUT );
+
# Close filehandle pager was using, restore the normal one
# if necessary,
close(SAVEOUT);
|
From hiroo.hayashi@computer.orgperl5db-1.39_10_in5.18.2.diff*** perl5db.pl.org Mon Mar 17 22:13:16 2014
--- perl5db.pl Tue Mar 18 01:03:05 2014
***************
*** 2418,2423 ****
--- 2418,2426 ----
open( OUT, ">&SAVEOUT" ) || _db_warn("Can't restore DB::OUT");
}
+ # Let Readline know the new filehandles.
+ reset_IN_OUT( \*IN, \*OUT );
+
# Close filehandle pager was using, restore the normal one
# if necessary,
close(SAVEOUT);
|
From hiroo.hayashi@computer.orgperl5db-1.43_in5.19.9.diff*** perl5db.pl.org Mon Mar 17 22:12:56 2014
--- perl5db.pl Tue Mar 18 01:04:53 2014
***************
*** 2419,2424 ****
--- 2419,2427 ----
open( OUT, ">&SAVEOUT" ) || _db_warn("Can't restore DB::OUT");
}
+ # Let Readline know the new filehandles.
+ reset_IN_OUT( \*IN, \*OUT );
+
# Close filehandle pager was using, restore the normal one
# if necessary,
close(SAVEOUT);
|
From @shlomifHi all, On Mon Mar 17 10:02:01 2014, hiroo.hayashi@computer.org wrote:
Thanks for the investigation and the fix. I tested it in bleadperl and it indeed fixed the problem (which also bothered me, but I lacked the tuits to fix it). That put aside, I have reworked the bleadperl patch a little to: 1. Fix the grammar in the comment a little. 2. Fix the indentation from tabs-based to be consistently space-based. That patch is attached here and I'm planning to also work on similar patches for maintperl-5.18.x and maintperl-5.16.x. Note that the cmp_version.t core test fails with it - perhaps the $VERSION in perl5db.pl needs to be updated. Regards, -- Shlomi Fish
|
From @shlomifperl5db-bleadperl-Term-RL-Gnu-pager-crash.patchdiff --git a/lib/perl5db.pl b/lib/perl5db.pl
index c1d6752..ae04a9a 100644
--- a/lib/perl5db.pl
+++ b/lib/perl5db.pl
@@ -2419,6 +2419,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);
|
The RT System itself - Status changed from 'new' to 'open' |
From @shlomifHi, replying to myself, I'm attaching the corresponding patches for maint5.18 and maint5.16 (which I tested to see that the bug is fixed). Please also credit Hiroo Hayashi as an originator of these patch. Regards, -- Shlomi Fish |
From @shlomifperl5db-maint5.16-Term-RL-Gnu-pager-crash.patchdiff --git a/lib/perl5db.pl b/lib/perl5db.pl
index 889f305..29bf740 100644
--- a/lib/perl5db.pl
+++ b/lib/perl5db.pl
@@ -3316,6 +3316,9 @@ our standard filehandles for input and output.
open( OUT, ">&SAVEOUT" ) || &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);
|
From @shlomifperl5db-maint5.18-Term-RL-Gnu-pager-crash.patchdiff --git a/lib/perl5db.pl b/lib/perl5db.pl
index da532fb..c2921d7 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);
|
From @rjbsThis has been applied to 5.19, and I've marked it as blocking the 5.16 and 5.18 maint branches' next releases. -- |
From @tonycozOn Mon Apr 07 07:59:57 2014, rjbs wrote:
+1 for maint 5.18 and 5.16. Tony |
From @khwilliamsonOn 04/15/2014 09:24 PM, Tony Cook via RT wrote:
+1 to both |
From @maukeOn Tue Apr 15 21:08:24 2014, public@khwilliamson.com wrote:
This ticket is open and listed as blocking 5.18.5. But it is listed as fixed in perl5184delta, so I think the blocking part can be removed (right?). Is there anything else left to do or can this whole ticket be closed? |
From @jkeenanOn Fri Feb 26 10:00:33 2016, mauke- wrote:
Let's close the ticket. The changes were applied to 5.16.3 and 5.18.4. I don't think there's anything left to be done. Thank you very much. |
@mauke - Status changed from 'open' to 'resolved' |
From hiroo.hayashi@computer.orgHi, I agree with you. There is nothing left. I'm sorry I did not know I had to take any actions.
-- |
Migrated from rt.perl.org#121456 (status was 'resolved')
Searchable as RT121456$
The text was updated successfully, but these errors were encountered: