This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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]

Throwing C++ exceptions from signal handlers


Yuval Kfir writes:
 > Hello,
 > is it possible to somehow convince gcc to properly throw an exception from a
 > signal handler context?

Yes, but only with synchronous exceptions like SIGSEGV and SIGFPE.

 > In particular, I'd like to get the following program to run on Linux with
 > gcc.  On Solaris (with Sun's compiler) it works fine.

Hmm.  This is a difficult thing to do in the general case.  It raises
all sorts of problems to do with destructors and cleanup regions.

Andrew.


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