Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "H.J. Lu" <hongjiu.lu@intel.com>
To: GDB <gdb-patches@sourceware.org>
Subject: PATCH: PR tui/9622: tui over-eagerly initializes readline
Date: Thu, 04 Feb 2010 17:07:00 -0000	[thread overview]
Message-ID: <20100204170700.GA12550@lucon.org> (raw)

We shouldn't initialize readline if gdb_stdout isn't a tty.  OK
to install?

Thanks.


H.J.
---
2010-02-04  H.J. Lu  <hongjiu.lu@intel.com>

	PR tui/9622
	* tui/tui-interp.c (tui_init): Call tui_initialize_readline
	only if gdb_stdout is a tty.

diff --git a/gdb/tui/tui-interp.c b/gdb/tui/tui-interp.c
index 3b59769..3bb8246 100644
--- a/gdb/tui/tui-interp.c
+++ b/gdb/tui/tui-interp.c
@@ -57,7 +57,8 @@ tui_init (int top_level)
 
   tui_initialize_io ();
   tui_initialize_win ();
-  tui_initialize_readline ();
+  if (ui_file_isatty (gdb_stdout))
+    tui_initialize_readline ();
 
   return NULL;
 }


             reply	other threads:[~2010-02-04 17:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-04 17:07 H.J. Lu [this message]
2010-02-04 17:34 ` Tom Tromey

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=20100204170700.GA12550@lucon.org \
    --to=hongjiu.lu@intel.com \
    --cc=gdb-patches@sourceware.org \
    --cc=hjl.tools@gmail.com \
    /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