+2007-01-01 David Schleef <ds@schleef.org>
+
+ * gst/gstplugin.c:
+ Restore the previous signal handler for SIGSEGV instead of
+ setting to default, since we may have stolen it away from
+ someone. (i.e., Mono)
+
2006-12-26 Tim-Philipp Müller <tim at centricular dot net>
* docs/random/draft-missing-plugins.txt:
}
#ifndef HAVE_WIN32
+static struct sigaction oldaction;
+
/*
* _gst_plugin_fault_handler_restore:
* segfault handler restorer
static void
_gst_plugin_fault_handler_restore (void)
{
- struct sigaction action;
-
- /* if asked to leave segfaults alone, just return */
- if (_gst_disable_segtrap)
+ if (!_gst_plugin_fault_handler_is_setup)
return;
- memset (&action, 0, sizeof (action));
- action.sa_handler = SIG_DFL;
+ _gst_plugin_fault_handler_is_setup = FALSE;
- sigaction (SIGSEGV, &action, NULL);
+ sigaction (SIGSEGV, &oldaction, NULL);
}
/*
if (_gst_plugin_fault_handler_is_setup)
return;
+ _gst_plugin_fault_handler_is_setup = TRUE;
+
memset (&action, 0, sizeof (action));
action.sa_handler = _gst_plugin_fault_handler_sighandler;
- sigaction (SIGSEGV, &action, NULL);
+ sigaction (SIGSEGV, &action, &oldaction);
}
#else
static void