From: Carlos Eduardo Seo <cseo@linux.vnet.ibm.com>
To: Carlos Eduardo Seo <cseo@linux.vnet.ibm.com>,
Pedro Alves <pedro_alves@portugalmail.pt>,
gdb-patches@sourceware.org, eliz@gnu.org
Subject: Re: [patch] tui: initialize signal handler
Date: Sat, 22 Sep 2007 23:53:00 -0000 [thread overview]
Message-ID: <46F5AAD0.5000706@linux.vnet.ibm.com> (raw)
In-Reply-To: <20070922231003.GB30487@caradoc.them.org>
[-- Attachment #1: Type: text/plain, Size: 649 bytes --]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Daniel Jacobowitz wrote:
> On Sat, Sep 22, 2007 at 04:23:26PM -0300, Carlos Eduardo Seo wrote:
>> +#ifdef SIGACTION
>
> #ifdef HAVE_SIGACTION
>
> I don't think anything defines SIGACTION. Otherwise, as Eli already
> said, OK to commit :-)
>
Whops... typo!
Corrected now. :)
- --
Carlos Eduardo Seo
Software Engineer
IBM Linux Technology Center
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFG9arPqvq7Aov/qQARAt7WAJ9BF+GF4oab+IKvi6l8eizgIGtulgCfZlqd
y/gvG5q1lxK5ggT63bvdAZE=
=SDP2
-----END PGP SIGNATURE-----
[-- Attachment #2: tui-sighandler.diff --]
[-- Type: text/x-patch, Size: 1893 bytes --]
2007-09-22 Carlos Eduardo Seo <cseo@linux.vnet.ibm.com>
* tui/tui-interp.c (tui_init): Initialize
tui's SIGWINCH signal handler.
* tui/tui-win.c (tui_initialize_win): New
function for initializing tui's SIGWINCH signal
handler.
* tui/tui-win.h (tui_initialize_win): Declare
Index: src/gdb/tui/tui-interp.c
===================================================================
--- src.orig/gdb/tui/tui-interp.c
+++ src/gdb/tui/tui-interp.c
@@ -56,6 +56,7 @@ tui_init (void)
tui_initialize_static_data ();
tui_initialize_io ();
+ tui_initialize_win ();
tui_initialize_readline ();
return NULL;
Index: src/gdb/tui/tui-win.c
===================================================================
--- src.orig/gdb/tui/tui-win.c
+++ src/gdb/tui/tui-win.c
@@ -50,6 +50,8 @@
#include <ctype.h>
#include "readline/readline.h"
+#include <signal.h>
+
/*******************************
** Static Local Decls
********************************/
@@ -813,6 +815,21 @@ tui_sigwinch_handler (int signal)
tui_set_win_resized_to (TRUE);
}
+/* Initializes SIGWINCH signal handler for the tui. */
+void
+tui_initialize_win (void)
+{
+#ifdef SIGWINCH
+#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
+}
/*************************
Index: src/gdb/tui/tui-win.h
===================================================================
--- src.orig/gdb/tui/tui-win.h
+++ src/gdb/tui/tui-win.h
@@ -49,6 +49,8 @@ extern int tui_active_border_attrs;
extern int tui_update_variables (void);
+extern void tui_initialize_win (void);
+
/* Update gdb's knowledge of the terminal size. */
extern void tui_update_gdb_sizes (void);
[-- Attachment #3: tui-sighandler.diff.sig --]
[-- Type: application/octet-stream, Size: 65 bytes --]
next prev parent reply other threads:[~2007-09-22 23:53 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-22 1:24 Carlos Eduardo Seo
2007-09-22 7:34 ` Eli Zaretskii
2007-09-22 10:44 ` Pedro Alves
2007-09-22 17:13 ` Carlos Eduardo Seo
2007-09-22 18:30 ` Eli Zaretskii
2007-09-22 18:54 ` Pedro Alves
2007-09-22 19:23 ` Carlos Eduardo Seo
2007-09-22 23:10 ` Daniel Jacobowitz
2007-09-22 23:53 ` Carlos Eduardo Seo [this message]
2007-09-29 0:10 ` Carlos Eduardo Seo
2007-09-29 0:29 ` Daniel Jacobowitz
2007-10-02 16:51 ` Ulrich Weigand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46F5AAD0.5000706@linux.vnet.ibm.com \
--to=cseo@linux.vnet.ibm.com \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=pedro_alves@portugalmail.pt \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox