From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15586 invoked by alias); 19 Nov 2014 09:25:54 -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 15577 invoked by uid 89); 19 Nov 2014 09:25:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Wed, 19 Nov 2014 09:25:53 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 5F5C7116A10; Wed, 19 Nov 2014 04:25:51 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id csbFt3nvSsKG; Wed, 19 Nov 2014 04:25:51 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id F0A191167F9; Wed, 19 Nov 2014 04:25:50 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 8B45340F79; Wed, 19 Nov 2014 13:25:47 +0400 (RET) Date: Wed, 19 Nov 2014 09:25:00 -0000 From: Joel Brobecker To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [RFA/Linux] Ask kernel to kill inferior when GDB terminates Message-ID: <20141119092547.GP5774@adacore.com> References: <1415984034-27122-1-git-send-email-brobecker@adacore.com> <54663729.6010708@redhat.com> <20141114173255.GD5774@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20141114173255.GD5774@adacore.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2014-11/txt/msg00437.txt.bz2 > > I could see this making some sense when GDB has spawned the process, > > but it seems harsh when GDB has attached to the process instead > > of spawning it? > > Hmmm, good point. I'd like to verify what happens in that case, and > whether the process remains stopped or if execution resumes in that > case. I took a little bit of time to experiment today. The experimentation was conducted with Linux 3.13.0-39-generic from x86_64 Ubuntu. In both cases, when GDB runs the program or attaches to a program, killing GDB while the inferior is still running detaches GDB from the inferior, which means it keeps running. I will adapt my patch when I have a moment. -- Joel