From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18854 invoked by alias); 25 Nov 2005 17:54:38 -0000 Received: (qmail 18846 invoked by uid 22791); 25 Nov 2005 17:54:38 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Fri, 25 Nov 2005 17:54:36 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1EfhmL-00013z-QR; Fri, 25 Nov 2005 12:54:33 -0500 Date: Fri, 25 Nov 2005 18:11:00 -0000 From: Daniel Jacobowitz To: Andrew STUBBS Cc: gdb-patches@sources.redhat.com Subject: Re: [PATCH] SIGTERM handler Message-ID: <20051125175433.GA736@nevyn.them.org> Mail-Followup-To: Andrew STUBBS , gdb-patches@sources.redhat.com References: <437B6374.1@st.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <437B6374.1@st.com> User-Agent: Mutt/1.5.8i X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2005-11/txt/msg00458.txt.bz2 On Wed, Nov 16, 2005 at 04:51:00PM +0000, Andrew STUBBS wrote: > Hi, > > This patch adds a handler for SIGTERM. > > The main purpose is to ensure that GDB quit through quit_force() and > therefore properly disconnects from the target. This is quite important > for our target interface and should do no harm for anybody else's. > > It also ensures that --return-child-result works when GDB exits this way. > > Thanks > > Andrew Stubbs > 2005-11-16 Andrew Stubbs > > * event-top.h (async_init_signals): Add SIGTERM handler. > (handle_sigterm): New function. > * event-top.h (handle_sigterm): New prototype. I'm dubious as to the value of this, but why not - patch is OK. I never send GDB a SIGTERM, but I send it SIGKILL on a regular basis. I guess it may get SIGTERMs during clean shutdown. -- Daniel Jacobowitz CodeSourcery, LLC