From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9349 invoked by alias); 23 Jul 2010 17:06:46 -0000 Received: (qmail 9339 invoked by uid 22791); 23 Jul 2010 17:06:45 -0000 X-SWARE-Spam-Status: No, hits=-6.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 23 Jul 2010 17:06:41 +0000 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o6NH6dBm010692 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 23 Jul 2010 13:06:39 -0400 Received: from host1.dyn.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o6NH6bAY009399 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 23 Jul 2010 13:06:39 -0400 Received: from host1.dyn.jankratochvil.net (localhost [127.0.0.1]) by host1.dyn.jankratochvil.net (8.14.4/8.14.4) with ESMTP id o6NH6aXr009088 for ; Fri, 23 Jul 2010 19:06:37 +0200 Received: (from jkratoch@localhost) by host1.dyn.jankratochvil.net (8.14.4/8.14.4/Submit) id o6NH6aIv009087 for gdb-patches@sourceware.org; Fri, 23 Jul 2010 19:06:36 +0200 Date: Fri, 23 Jul 2010 17:06:00 -0000 From: Jan Kratochvil To: gdb-patches@sourceware.org Subject: [patch] Do not break while asking with -batch Message-ID: <20100723170635.GA8959@host1.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-12-10) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-07/txt/msg00360.txt.bz2 Hi, there was PR 9591 which originated from a request to safely `gdb_gcore.sh' even from a very small terminal window. FSF GDB HEAD currently still asks in such window ---Type to continue, or q to quit--- and aborts. OK to check-in? No regressions on {x86_64,x86_64-m32,i686}-fedora13-linux-gnu. Thanks, Jan gdb/ 2010-07-23 Jan Kratochvil * utils.c (prompt_for_continue): Return on BATCH_FLAG or not INPUT_FROM_TERMINAL_P. --- a/gdb/utils.c +++ b/gdb/utils.c @@ -2155,6 +2155,9 @@ prompt_for_continue (void) char *ignore; char cont_prompt[120]; + if (batch_flag || ! input_from_terminal_p ()) + return; + if (annotation_level > 1) printf_unfiltered (("\n\032\032pre-prompt-for-continue\n"));