2013-08-15 Muhammad Bilal <mbilal@codesourcery.com>
authorMuhammad Bilal <mbilal@sourceware.org>
Thu, 15 Aug 2013 08:18:31 +0000 (08:18 +0000)
committerMuhammad Bilal <mbilal@sourceware.org>
Thu, 15 Aug 2013 08:18:31 +0000 (08:18 +0000)
PR cli/15841
* top.c (quit_force): Skip writing history file
if input is not from terminal.

gdb/ChangeLog
gdb/top.c

index 13bc9b48056741f34cfb71d38afb92d6d18ca058..ea013235ef370abe2568047fd5d4879660ac64dc 100644 (file)
@@ -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,
index 33a78da84c5ca048f4b0add8c3c16abeb7ff7078..516ffb9f7c5db5ce95d1e1641acd83e4a218e9d7 100644 (file)
--- 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;
This page took 0.031682 seconds and 4 git commands to generate.