Permalink
Browse files

remove the sigbus/sigsegv signal handlers, let macruby crash immediat…

…ely to make the life of crashtrace analyzers easier

git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@4077 23306eb0-4c56-4727-a40e-e92c0eb68959
  • Loading branch information...
1 parent dbdbfc0 commit f4e9be45fecdfafff49a21e5ea8e6088827a627c @lrz lrz committed May 12, 2010
Showing with 0 additions and 30 deletions.
  1. +0 −30 signal.c
View
30 signal.c
@@ -374,26 +374,6 @@ rb_enable_interrupt(void)
}
static RETSIGTYPE
-sigbus(int sig)
-{
- rb_bug("Bus Error");
-}
-
-static int segv_received = 0;
-static RETSIGTYPE
-sigsegv(int sig)
-{
- if (segv_received) {
- fprintf(stderr, "SEGV recieved in SEGV handler\n");
- exit(EXIT_FAILURE);
- }
- else {
- segv_received = 1;
- rb_bug("Segmentation fault");
- }
-}
-
-static RETSIGTYPE
sigpipe(int sig)
{
/* do nothing */
@@ -475,12 +455,6 @@ default_handler(int sig)
case SIGUSR2:
func = sighandler;
break;
- case SIGBUS:
- func = sigbus;
- break;
- case SIGSEGV:
- func = (sighandler_t)sigsegv;
- break;
case SIGPIPE:
func = sigpipe;
break;
@@ -776,10 +750,6 @@ Init_signal(void)
#ifdef RUBY_DEBUG_ENV
if (!ruby_enable_coredump)
#endif
- {
- install_sighandler(SIGBUS, sigbus);
- install_sighandler(SIGSEGV, sigsegv);
- }
install_sighandler(SIGPIPE, sigpipe);
init_sigchld(SIGCHLD);

0 comments on commit f4e9be4

Please sign in to comment.