This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] tui: initialize signal handler


> Date: Sat, 22 Sep 2007 14:13:09 -0300
> From: Carlos Eduardo Seo <cseo@linux.vnet.ibm.com>
> CC: gdb-patches@sourceware.org, eliz@gnu.org
> 
> +#ifdef SIGWINCH
>  /* SIGWINCH signal handler for the tui.  This signal handler is always
>     called, even when the readline package clears signals because it is
>     set as the old_sigwinch() (TUI only).  */
> @@ -813,6 +816,20 @@ tui_sigwinch_handler (int signal)
>    tui_set_win_resized_to (TRUE);
>  }
>  
> +/* Initializes SIGWINCH signal handler for the tui.  */
> +void
> +tui_initialize_win (void)
> +{
> +#ifdef HAVE_SIGACTION
> +  struct sigaction old_winch;
> +  memset (&old_winch, 0, sizeof (old_winch));
> +  old_winch.sa_handler = &tui_sigwinch_handler;
> +  sigaction (SIGWINCH, &old_winch, NULL);
> +#else
> +  signal (SIGWINCH, &tui_sigwinch_handler);
> +#endif
> +}
> +#endif

This is fine.  Thanks.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]