From 905884dcdd044914cf15a8fb7a8a8e5c80aadc7f Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Mon, 7 Jun 1999 17:43:47 +0000 Subject: [PATCH] Trying to fix sigaltstack() problem reported by Debian users. SIGTRAP might be undefined (beos). --- loader/signal.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/loader/signal.c b/loader/signal.c index 6dd77bd82a9..1fdb019ed82 100644 --- a/loader/signal.c +++ b/loader/signal.c @@ -298,7 +298,9 @@ void SIGNAL_InitHandlers(void) SIGNAL_SetHandler( SIGSEGV, (void (*)())SIGNAL_fault, 1); SIGNAL_SetHandler( SIGILL, (void (*)())SIGNAL_fault, 1); SIGNAL_SetHandler( SIGFPE, (void (*)())SIGNAL_fault, 1); +#ifdef SIGTRAP SIGNAL_SetHandler( SIGTRAP, (void (*)())SIGNAL_trap, 1); /* debugger */ +#endif SIGNAL_SetHandler( SIGHUP, (void (*)())SIGNAL_trap, 1); /* forced break*/ #ifdef SIGBUS SIGNAL_SetHandler( SIGBUS, (void (*)())SIGNAL_fault, 1); @@ -319,7 +321,7 @@ BOOL SIGNAL_Init(void) if (sigaltstack(&ss, NULL) < 0) { perror("sigaltstack"); - return FALSE; + /* fall through on error and try it differently */ } #endif /* HAVE_SIGALTSTACK */