From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18456 invoked by alias); 22 Sep 2007 18:30:18 -0000 Received: (qmail 18424 invoked by uid 22791); 22 Sep 2007 18:30:14 -0000 X-Spam-Check-By: sourceware.org Received: from heller.inter.net.il (HELO heller.inter.net.il) (213.8.233.23) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 22 Sep 2007 18:30:12 +0000 Received: from HOME-C4E4A596F7 (IGLD-84-229-122-46.inter.net.il [84.229.122.46]) by heller.inter.net.il (MOS 3.7.3a-GA) with ESMTP id DRN77813 (AUTH halo1); Sat, 22 Sep 2007 20:30:04 +0200 (IST) Date: Sat, 22 Sep 2007 18:30:00 -0000 Message-Id: From: Eli Zaretskii To: Carlos Eduardo Seo CC: pedro_alves@portugalmail.pt, gdb-patches@sourceware.org In-reply-to: <46F54D25.3050603@linux.vnet.ibm.com> (message from Carlos Eduardo Seo on Sat, 22 Sep 2007 14:13:09 -0300) Subject: Re: [patch] tui: initialize signal handler Reply-to: Eli Zaretskii References: <46F46E9E.5070003@linux.vnet.ibm.com> <46F4F1D6.6060108@portugalmail.pt> <46F54D25.3050603@linux.vnet.ibm.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-09/txt/msg00309.txt.bz2 > Date: Sat, 22 Sep 2007 14:13:09 -0300 > From: Carlos Eduardo Seo > 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.