From 0086bb9d0678876e2e3e9b4002a0f44af2c45ee4 Mon Sep 17 00:00:00 2001 From: tron Date: Wed, 17 Nov 2004 08:11:24 +0000 Subject: (svn r653) Prevent SDL parachute from catching SIGSEGV and SIGFPE (pasky) --- sdl.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/sdl.c b/sdl.c index a9869603d..596807a4b 100644 --- a/sdl.c +++ b/sdl.c @@ -119,6 +119,17 @@ static void SdlAbort(int sig) { /* Own hand-made parachute for the cases of failed assertions. */ SDL_CALL SDL_Quit(); + + switch (sig) { + case SIGSEGV: + case SIGFPE: + signal(sig, SIG_DFL); + raise(sig); + break; + + default: + break; + } } #endif @@ -141,6 +152,8 @@ static char *SdlOpen(uint32 x) #ifdef UNIX signal(SIGABRT, SdlAbort); + signal(SIGSEGV, SdlAbort); + signal(SIGFPE, SdlAbort); #endif return NULL; @@ -154,6 +167,8 @@ static void SdlClose(uint32 x) SDL_CALL SDL_Quit(); #ifdef UNIX signal(SIGABRT, SIG_DFL); + signal(SIGSEGV, SIG_DFL); + signal(SIGFPE, SIG_DFL); #endif } } -- cgit v1.2.3-70-g09d2