[macruby-changes] [4077] MacRuby/trunk/signal.c

source_changes at macosforge.org source_changes at macosforge.org
Tue May 11 19:07:29 PDT 2010


Revision: 4077
          http://trac.macosforge.org/projects/ruby/changeset/4077
Author:   lsansonetti at apple.com
Date:     2010-05-11 19:07:24 -0700 (Tue, 11 May 2010)
Log Message:
-----------
remove the sigbus/sigsegv signal handlers, let macruby crash immediately to make the life of crashtrace analyzers easier

Modified Paths:
--------------
    MacRuby/trunk/signal.c

Modified: MacRuby/trunk/signal.c
===================================================================
--- MacRuby/trunk/signal.c	2010-05-12 01:32:22 UTC (rev 4076)
+++ MacRuby/trunk/signal.c	2010-05-12 02:07:24 UTC (rev 4077)
@@ -374,26 +374,6 @@
 }
 
 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 @@
       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 @@
 #ifdef RUBY_DEBUG_ENV
     if (!ruby_enable_coredump)
 #endif
-    {
-	install_sighandler(SIGBUS, sigbus);
-	install_sighandler(SIGSEGV, sigsegv);
-    }
     install_sighandler(SIGPIPE, sigpipe);
 
     init_sigchld(SIGCHLD);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20100511/7b2e3df4/attachment.html>


More information about the macruby-changes mailing list