aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMuhammad Bilal <mbilal@sourceware.org>2013-08-15 08:18:31 +0000
committerMuhammad Bilal <mbilal@sourceware.org>2013-08-15 08:18:31 +0000
commit35ab155d372b1cf4d57a889acacd3913fbc9d793 (patch)
treeca49332686df80ca7b984146dafddaf323339cc9
parent2e53f7d6010d59f1ea82d55dbe3ba41e5c460ae3 (diff)
downloadgdb-35ab155d372b1cf4d57a889acacd3913fbc9d793.zip
gdb-35ab155d372b1cf4d57a889acacd3913fbc9d793.tar.gz
gdb-35ab155d372b1cf4d57a889acacd3913fbc9d793.tar.bz2
2013-08-15 Muhammad Bilal <mbilal@codesourcery.com>
PR cli/15841 * top.c (quit_force): Skip writing history file if input is not from terminal.
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/top.c3
2 files changed, 8 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 13bc9b4..ea01323 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2013-08-15 Muhammad Bilal <mbilal@codesourcery.com>
+
+ PR cli/15841
+ * top.c (quit_force): Skip writing history file
+ if input is not from terminal.
+
2013-08-14 Tom Tromey <tromey@redhat.com>
* remote.c (struct remote_state) <echo_nextthread, nextthread,
diff --git a/gdb/top.c b/gdb/top.c
index 33a78da..516ffb9 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -1433,7 +1433,8 @@ quit_force (char *args, int from_tty)
/* Save the history information if it is appropriate to do so. */
DO_TRY
{
- if (write_history_p && history_filename)
+ if (write_history_p && history_filename
+ && input_from_terminal_p ())
write_history (history_filename);
}
DO_PRINT_EX;