X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Futils.c;h=c70e99cea4924a3dc5093b3d340db29a03b85784;hb=bec903c96bc5119e357b4ad2cab99bbee7de628e;hp=db5104d025aa45b1983114eb0ba953e590079282;hpb=585a46a2d01d25181926329f258f1d1374f93e99;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/utils.c b/gdb/utils.c index db5104d025..c70e99cea4 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -1047,10 +1047,12 @@ print_sys_errmsg (const char *string, int errcode) void quit (void) { + struct ui *ui = current_ui; + if (sync_quit_force_run) { sync_quit_force_run = 0; - quit_force (NULL, stdin == instream); + quit_force (NULL, 0); } #ifdef __MSDOS__ @@ -1269,7 +1271,8 @@ defaulted_query (const char *ctlstr, const char defchar, va_list args) question we're asking, and then answer the default automatically. This way, important error messages don't get lost when talking to GDB over a pipe. */ - if (! input_from_terminal_p ()) + if (current_ui->instream != current_ui->stdin_stream + || !input_interactive_p (current_ui)) { target_terminal_ours_for_output (); wrap_here ("");