Created
December 5, 2016 14:41
-
-
Save mgaudet/a247522dfd95ce4cd8a3cd37c5d9a185 to your computer and use it in GitHub Desktop.
Revert SIGABRT handler in Ruby+OMR Preview
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 595dfc0c2b55e5b5da418c4f80d4922817822b74 Mon Sep 17 00:00:00 2001 | |
From: Matthew Gaudet <magaudet@ca.ibm.com> | |
Date: Mon, 5 Dec 2016 09:38:57 -0500 | |
Subject: [PATCH] Revert "Register a handler for sigabrt." | |
--- | |
signal.c | 23 ----------------------- | |
1 file changed, 23 deletions(-) | |
diff --git a/signal.c b/signal.c | |
index dfe359f..93383ed 100644 | |
--- a/signal.c | |
+++ b/signal.c | |
@@ -928,17 +928,6 @@ check_reserved_signal_(const char *name, size_t name_len) | |
} | |
#endif | |
-#ifdef SIGABRT | |
-static RETSIGTYPE | |
-sigabrt(int sig SIGINFO_ARG) | |
-{ | |
- /* Immediately reinstall the default signal handler. | |
- * This way, rb_bug or any other error will successfully core dump. */ | |
- ruby_signal(sig, SIG_DFL); | |
- rb_bug("Abort" MESSAGE_FAULT_ADDRESS); /* Will recursively abort. */ | |
-} | |
-#endif /* SIGABRT */ | |
- | |
static void | |
signal_exec(VALUE cmd, int safe, int sig) | |
{ | |
@@ -1061,11 +1050,6 @@ default_handler(int sig) | |
func = (sighandler_t)sigsegv; | |
break; | |
#endif | |
-#if defined(OMR) && defined(SIGABRT) | |
- case SIGABRT: | |
- func = (sighandler_t)sigabrt; | |
- break; | |
-#endif | |
#ifdef SIGPIPE | |
case SIGPIPE: | |
func = SIG_IGN; | |
@@ -1228,10 +1212,6 @@ reserved_signal_p(int signo) | |
if (signo == SIGSEGV) | |
return 1; | |
#endif | |
-#ifdef SIGABRT | |
- if (signo == SIGABRT) | |
- return 1; | |
-#endif | |
#ifdef SIGBUS | |
if (signo == SIGBUS) | |
return 1; | |
@@ -1484,9 +1464,6 @@ Init_signal(void) | |
# endif | |
install_sighandler(SIGSEGV, (sighandler_t)sigsegv); | |
#endif | |
-#ifdef SIGABRT | |
- install_sighandler(SIGABRT, (sighandler_t)sigabrt); | |
-#endif | |
} | |
#ifdef SIGPIPE | |
install_sighandler(SIGPIPE, SIG_IGN); | |
-- | |
2.7.4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment