This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] SIGTERM handler


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]