[3/3] Disable readline's SIGWINCH handler

Message ID 1429836801-14218-3-git-send-email-patrick@parcs.ath.cx
State New, archived
Headers

Commit Message

Patrick Palka April 24, 2015, 12:53 a.m. UTC
  We no longer need it as we handle SIGWINCH ourselves.  Also move the
call to init_page_info() from initialize_utils() to the latter
function's only caller, gdb_init().

gdb/ChangeLog:

	* utils.c (init_page_info): Set rl_catch_sigwinch to zero.
	(initialize_utils): Move call of init_page_info() to ...
	* top.c (gdb_init): ... here.
---
 gdb/top.c   | 2 ++
 gdb/utils.c | 5 +++--
 2 files changed, 5 insertions(+), 2 deletions(-)
  

Comments

Pedro Alves April 27, 2015, 4:35 p.m. UTC | #1
On 04/24/2015 01:53 AM, Patrick Palka wrote:
> We no longer need it as we handle SIGWINCH ourselves.  Also move the
> call to init_page_info() from initialize_utils() to the latter
> function's only caller, gdb_init().
> 
> gdb/ChangeLog:
> 
> 	* utils.c (init_page_info): Set rl_catch_sigwinch to zero.
> 	(initialize_utils): Move call of init_page_info() to ...
> 	* top.c (gdb_init): ... here.

OK.

Thanks,
Pedro Alves
  

Patch

diff --git a/gdb/top.c b/gdb/top.c
index 647d9fb..ddf5415 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -1939,6 +1939,8 @@  gdb_init (char *argv0)
   initialize_targets ();    /* Setup target_terminal macros for utils.c.  */
   initialize_utils ();	    /* Make errors and warnings possible.  */
 
+  init_page_info ();
+
   /* Here is where we call all the _initialize_foo routines.  */
   initialize_all_files ();
 
diff --git a/gdb/utils.c b/gdb/utils.c
index ec2fd87..b4d8680 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -1696,6 +1696,9 @@  init_page_info (void)
 #endif
     }
 
+  /* We handle SIGWINCH ourselves.  */
+  rl_catch_sigwinch = 0;
+
   set_screen_size ();
   set_width ();
 }
@@ -2712,8 +2715,6 @@  Setting this to \"unlimited\" or zero causes GDB never pause during output."),
 			    show_lines_per_page,
 			    &setlist, &showlist);
 
-  init_page_info ();
-
   add_setshow_boolean_cmd ("pagination", class_support,
 			   &pagination_enabled, _("\
 Set state of GDB output pagination."), _("\