Commit 732dd65c authored by Alexander Larsson's avatar Alexander Larsson Committed by Alexander Larsson

Disable unsafe segv handler by default

2007-12-17  Alexander Larsson  <alexl@redhat.com>

        * src/nautilus-main.c:
        (setup_debug_log_signals):
	Disable unsafe segv handler by default


svn path=/trunk/; revision=13533
parent 8fc1e99e
2007-12-17 Alexander Larsson <alexl@redhat.com>
* src/nautilus-main.c:
(setup_debug_log_signals):
Disable unsafe segv handler by default
2007-12-14 David Zeuthen <davidz@redhat.com>
* libnautilus-private/nautilus-desktop-icon-file.c:
......
......@@ -230,13 +230,6 @@ debug_log_io_cb (GIOChannel *io, GIOCondition condition, gpointer data)
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 @@ sigusr1_handler (int sig)
;
}
/* 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 @@ sigfatal_handler (int sig)
if (func != NULL && func != SIG_IGN && func != SIG_DFL)
(* func) (sig);
}
#endif
static void
setup_debug_log_signals (void)
......@@ -304,6 +309,9 @@ setup_debug_log_signals (void)
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 @@ setup_debug_log_signals (void)
sigaction(SIGTRAP, &sa, &old_trap_sa);
sigaction(SIGFPE, &sa, &old_fpe_sa);
sigaction(SIGBUS, &sa, &old_bus_sa);
#endif
}
static GLogFunc default_log_handler;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment