Blob Blame History Raw
--- trunk/src/nautilus-main.c	2007/12/17 09:55:38	13532
+++ trunk/src/nautilus-main.c	2007/12/17 11:11:48	13533
@@ -230,13 +230,6 @@
 	return FALSE;
 }
 
-/* sigaction structures for the old handlers of these signals */
-static struct sigaction old_segv_sa;
-static struct sigaction old_abrt_sa;
-static struct sigaction old_trap_sa;
-static struct sigaction old_fpe_sa;
-static struct sigaction old_bus_sa;
-
 static void
 sigusr1_handler (int sig)
 {
@@ -244,6 +237,17 @@
 		;
 }
 
+/* This is totally broken as we're using non-signal safe
+ * calls in sigfatal_handler. Disable by default. */
+#ifdef USE_SEGV_HANDLER
+
+/* sigaction structures for the old handlers of these signals */
+static struct sigaction old_segv_sa;
+static struct sigaction old_abrt_sa;
+static struct sigaction old_trap_sa;
+static struct sigaction old_fpe_sa;
+static struct sigaction old_bus_sa;
+
 static void
 sigfatal_handler (int sig)
 {
@@ -286,6 +290,7 @@
 	if (func != NULL && func != SIG_IGN && func != SIG_DFL)
 		(* func) (sig);
 }
+#endif
 
 static void
 setup_debug_log_signals (void)
@@ -304,6 +309,9 @@
 	sa.sa_flags = 0;
 	sigaction (SIGUSR1, &sa, NULL);
 
+	/* This is totally broken as we're using non-signal safe
+	 * calls in sigfatal_handler. Disable by default. */
+#ifdef USE_SEGV_HANDLER
 	sa.sa_handler = sigfatal_handler;
 	sigemptyset (&sa.sa_mask);
 	sa.sa_flags = 0;
@@ -313,6 +321,7 @@
 	sigaction(SIGTRAP, &sa, &old_trap_sa);
 	sigaction(SIGFPE,  &sa, &old_fpe_sa);
 	sigaction(SIGBUS,  &sa, &old_bus_sa);
+#endif
 }
 
 static GLogFunc default_log_handler;