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