diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 92a664dc9a..e532a12b4c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2016-08-05 Pedro Alves + + PR remote/20398 + * remote-fileio.c (remote_fileio_quit_handler): Check the quit + flag before calling quit. + 2016-08-05 Pedro Alves * NEWS: Mention that GDB and GDBserver build with a C++ compiler diff --git a/gdb/remote-fileio.c b/gdb/remote-fileio.c index 93121aaa42..e35bd5b66a 100644 --- a/gdb/remote-fileio.c +++ b/gdb/remote-fileio.c @@ -308,7 +308,8 @@ static quit_handler_ftype *remote_fileio_o_quit_handler; static void remote_fileio_quit_handler (void) { - quit (); + if (check_quit_flag ()) + quit (); } static void