This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] SIGTERM handler
- From: Daniel Jacobowitz <drow at false dot org>
- To: Andrew STUBBS <andrew dot stubbs at st dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Fri, 25 Nov 2005 12:54:33 -0500
- Subject: Re: [PATCH] SIGTERM handler
- References: <437B6374.1@st.com>
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 <andrew.stubbs@st.com>
>
> * 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