This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Throwing C++ exceptions in signal handlers
- From: Nathan Sidwell <nathan at codesourcery dot com>
- To: Roger Sayle <roger at eyesopen dot com>
- Cc: gcc <gcc at gcc dot gnu dot org>
- Date: Mon, 02 Sep 2002 23:10:13 +0100
- Subject: Re: Throwing C++ exceptions in signal handlers
- Organization: Codesourcery LLC
- References: <Pine.LNX.4.33.0209021500250.24609-100000@www.eyesopen.com>
Roger Sayle wrote:
>
> I have a strange question to ask of the GCC folks that understand
> more about exception handling and signals than I do. Is it reasonable
> (or safe) to throw an exception in a signal handler.
It is neither.
> Might it be safer to comment out "raise" in cp/cfns.gperf, or is
> throwing an exception in a signal handler explicitly forbidden?
It is not permitted.
throwing an exception, is more than simply (sig)longjmp.
nathan
--
Dr Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
'But that's a lie.' - 'Yes it is. What's your point?'
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org