From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6877 invoked by alias); 23 Aug 2011 19:32:19 -0000 Received: (qmail 6864 invoked by uid 22791); 23 Aug 2011 19:32:17 -0000 X-SWARE-Spam-Status: No, hits=-6.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS 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; Tue, 23 Aug 2011 19:32:00 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p7NJW0GG005746 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 23 Aug 2011 15:32:00 -0400 Received: from host1.jankratochvil.net (ovpn-116-42.ams2.redhat.com [10.36.116.42]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p7NJVvst019032 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 23 Aug 2011 15:31:59 -0400 Received: from host1.jankratochvil.net (localhost [127.0.0.1]) by host1.jankratochvil.net (8.14.4/8.14.4) with ESMTP id p7NJVvKo031037 for ; Tue, 23 Aug 2011 21:31:57 +0200 Received: (from jkratoch@localhost) by host1.jankratochvil.net (8.14.4/8.14.4/Submit) id p7NJVuiI031036 for gdb-patches@sourceware.org; Tue, 23 Aug 2011 21:31:56 +0200 Date: Tue, 23 Aug 2011 19:32:00 -0000 From: Jan Kratochvil To: gdb-patches@sourceware.org Subject: [patch] Fix target-async SIGTTOU stop (PR 12260) Message-ID: <20110823193156.GA30724@host1.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) 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: 2011-08/txt/msg00422.txt.bz2 Hi, it is difficult to play with `set target-async on' as it usually SIGTTOU stops at various places. http://sourceware.org/bugzilla/show_bug.cgi?id=12260 $ ./gdb -nx -ex 'set target-async on' -ex start ./gdb [...] Starting program: .../gdb/gdb [1]+ Stopped ./gdb -nx -ex 'set target-async on' -ex start ./gdb If it has a regression it IMO only means there is missing target_terminal_inferior call at some other place. No regressions on {x86_64,x86_64-m32,i686}-fedora16pre-linux-gnu. But I was unable to reproduce the problem under DejaGnu so the regression test may not be meaningful. Not going to check it in without a review. Thanks, Jan gdb/ 2011-08-23 Jan Kratochvil PR 12260 * event-top.c (cli_command_loop): Call target_terminal_ours. --- a/gdb/event-top.c +++ b/gdb/event-top.c @@ -193,6 +193,8 @@ cli_command_loop (void) char *a_prompt; char *gdb_prompt = get_prompt (0); + target_terminal_ours (); + /* Tell readline what the prompt to display is and what function it will need to call after a whole line is read. This also displays the first prompt. */