aboutsummaryrefslogtreecommitdiff
path: root/gdb/top.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/top.c')
-rw-r--r--gdb/top.c3
1 files changed, 2 insertions, 1 deletions
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;