From 8cb30fa5fb6084f5a6b67120ab1155b7da029e9f Mon Sep 17 00:00:00 2001 From: Derrick Brashear Date: Fri, 11 Apr 2003 18:50:12 +0000 Subject: [PATCH] softsig-dont-block-critical-signals-20030411 blocking these seems to prevent all threads from dying when the kernel gives e.g. SIGSEGV to one of the processes. since softsig is to protect us from what signals we handle might do in the handler, this should be fine --- src/util/pthread_nosigs.h | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/src/util/pthread_nosigs.h b/src/util/pthread_nosigs.h index 8f84fc2cb..fe7477257 100644 --- a/src/util/pthread_nosigs.h +++ b/src/util/pthread_nosigs.h @@ -27,9 +27,45 @@ #else #define AFS_SET_SIGMASK pthread_sigmask #endif +#ifdef SIGSEGV +#define _SETSEGV sigdelset(&i_tset, SIGSEGV); +#else +#define _SETSEGV ; +#endif +#ifdef SIGBUS +#define _SETBUS sigdelset(&i_tset, SIGBUS); +#else +#define _SETBUS ; +#endif +#ifdef SIGILL +#define _SETILL sigdelset(&i_tset, SIGILL); +#else +#define _SETILL ; +#endif +#ifdef SIGTRAP +#define _SETTRAP sigdelset(&i_tset, SIGTRAP); +#else +#define _SETTRAP ; +#endif +#ifdef SIGABRT +#define _SETABRT sigdelset(&i_tset, SIGABRT); +#else +#define _SETABRT ; +#endif +#ifdef SIGFPE +#define _SETFPE sigdelset(&i_tset, SIGFPE); +#else +#define _SETFPE ; +#endif #define AFS_SIGSET_CLEAR() \ do { \ sigfillset(&i_tset); \ + _SETSEGV \ + _SETBUS \ + _SETILL \ + _SETTRAP \ + _SETABRT \ + _SETFPE \ assert(AFS_SET_SIGMASK(SIG_BLOCK, &i_tset, &i_oset) == 0); \ } while (0) -- 2.39.5