Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Carlos Eduardo Seo <cseo@linux.vnet.ibm.com>
To: gdb-patches@sourceware.org
Subject: [patch] tui: initialize signal handler
Date: Sat, 22 Sep 2007 01:24:00 -0000	[thread overview]
Message-ID: <46F46E9E.5070003@linux.vnet.ibm.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 565 bytes --]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello all

I noticed that the TUI signal handler isn't initialized anywhere. Here's
a patch to fix it. I'm not sure if this is the correct file to add this,
though.

What do you think?

Regards,

- --
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

iD8DBQFG9G6Uqvq7Aov/qQARAoCxAJ9OlDthCDDQiviQUtLn8ssYBnSQGwCeJW5p
MnQvOGlkG1PReK9L8nQQGMs=
=FtxO
-----END PGP SIGNATURE-----

[-- Attachment #2: tui-sighandler.diff --]
[-- Type: text/x-patch, Size: 635 bytes --]

2007-09-21   Carlos Eduardo Seo <cseo@linux.vnet.ibm.com>

	gdb/tui/tui.c (tui_initialize_readline): initialize 
	TUI's SIGWINCH signal handler.

Index: src/gdb/tui/tui.c
===================================================================
--- src.orig/gdb/tui/tui.c
+++ src/gdb/tui/tui.c
@@ -309,6 +309,11 @@ tui_initialize_readline (void)
   int i;
   Keymap tui_ctlx_keymap;
 
+  struct sigaction old_winch;
+  memset (&old_winch, 0, sizeof (old_winch));
+  old_winch.sa_handler = &tui_sigwinch_handler;
+  sigaction (SIGWINCH, &old_winch, NULL);
+
   rl_initialize ();
 
   rl_add_defun ("tui-switch-mode", tui_rl_switch_mode, -1);

[-- Attachment #3: tui-sighandler.diff.sig --]
[-- Type: application/octet-stream, Size: 65 bytes --]

             reply	other threads:[~2007-09-22  1:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-22  1:24 Carlos Eduardo Seo [this message]
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
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=46F46E9E.5070003@linux.vnet.ibm.com \
    --to=cseo@linux.vnet.ibm.com \
    --cc=gdb-patches@sourceware.org \
    /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