/*
* The signals listed here should either be handled by NaCl (or otherwise
- * trusted) or have handlers that are expected to crash.
- * Signals for which handlers are expected to crash should be listed
- * in the NaClSignalHandleCustomCrashHandler function below.
+ * trusted code).
*/
static int s_Signals[] = {
#if NACL_ARCH(NACL_BUILD_ARCH) != NACL_mips
}
}
-/*
- * If |sig| had a handler that was expected to crash, exit.
- */
-static void NaClSignalHandleCustomCrashHandler(int sig) {
- /* Only SIGSYS is expected to have a custom crash handler. */
- if (sig == SIGSYS) {
- char tmp[128];
- SNPRINTF(tmp, sizeof(tmp),
- "\n** Signal %d has a custom crash handler but did not crash.\n",
- sig);
- NaClSignalErrorMessage(tmp);
- NaClExit(-sig);
- }
-}
-
static void FindAndRunHandler(int sig, siginfo_t *info, void *uc) {
unsigned int a;
if (s_OldActions[a].sa_sigaction != NULL) {
/* then call the old handler. */
s_OldActions[a].sa_sigaction(sig, info, uc);
- NaClSignalHandleCustomCrashHandler(sig);
break;
}
} else {
(s_OldActions[a].sa_handler != SIG_IGN)) {
/* and call the old signal. */
s_OldActions[a].sa_handler(sig);
- NaClSignalHandleCustomCrashHandler(sig);
break;
}
}