From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 60904 invoked by alias); 27 Jul 2015 18:23:37 -0000 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 Received: (qmail 60895 invoked by uid 89); 27 Jul 2015 18:23:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 27 Jul 2015 18:23:34 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 8A2383897A2; Mon, 27 Jul 2015 18:23:33 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t6RGdB7W001005; Mon, 27 Jul 2015 12:39:12 -0400 Message-ID: <55B65EAE.5090000@redhat.com> Date: Mon, 27 Jul 2015 18:23:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Patrick Palka , "gdb-patches@sourceware.org" Subject: Re: [PATCH] Call target_terminal_ours in quit_force References: <1438013299-1449-1-git-send-email-patrick@parcs.ath.cx> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2015-07/txt/msg00802.txt.bz2 On 07/27/2015 05:11 PM, Patrick Palka wrote: > On Mon, Jul 27, 2015 at 12:08 PM, Patrick Palka wrote: >> We should make sure our terminal settings are in effect before finally >> quitting GDB. Our terminal settings may not be in effect at this point >> if we are e.g. quitting due to a SIGTERM. > > I should add, "quitting due to a SIGTERM while an inferior an inferior > is running in the foreground." Looks OK, though I notice that the settings are broken even if we we're not debugging anything: $ stty speed 38400 baud; line = 0; iutf8 $ ./gdb GNU gdb (GDB) 7.10.50.20150726-cvs (gdb) *sent SIGTERM from another terminal, gdb exits* $ $ stty (echo is off) speed 38400 baud; line = 0; lnext = ; min = 1; time = 0; -icrnl iutf8 -icanon -echo $ Do you also see this? Can I convince you to add a test? :-) You wouldn't have to write it from scratch; we already have a test that checks that terminal settings are preserved: gdb.base/batch-preserve-term-settings.exp Thanks, Pedro Alves