mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 02:01:12 +00:00
gst/gstplugin.c: Restore the previous signal handler for SIGSEGV instead of setting to default, since we may have sto...
Original commit message from CVS: * 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)
This commit is contained in:
parent
24e12f3c9c
commit
b7e4487952
2 changed files with 15 additions and 8 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
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>
|
2006-12-26 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
* docs/random/draft-missing-plugins.txt:
|
* docs/random/draft-missing-plugins.txt:
|
||||||
|
|
|
@ -270,6 +270,8 @@ gst_plugin_register_func (GstPlugin * plugin, GModule * module,
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef HAVE_WIN32
|
#ifndef HAVE_WIN32
|
||||||
|
static struct sigaction oldaction;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* _gst_plugin_fault_handler_restore:
|
* _gst_plugin_fault_handler_restore:
|
||||||
* segfault handler restorer
|
* segfault handler restorer
|
||||||
|
@ -277,16 +279,12 @@ gst_plugin_register_func (GstPlugin * plugin, GModule * module,
|
||||||
static void
|
static void
|
||||||
_gst_plugin_fault_handler_restore (void)
|
_gst_plugin_fault_handler_restore (void)
|
||||||
{
|
{
|
||||||
struct sigaction action;
|
if (!_gst_plugin_fault_handler_is_setup)
|
||||||
|
|
||||||
/* if asked to leave segfaults alone, just return */
|
|
||||||
if (_gst_disable_segtrap)
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
memset (&action, 0, sizeof (action));
|
_gst_plugin_fault_handler_is_setup = FALSE;
|
||||||
action.sa_handler = SIG_DFL;
|
|
||||||
|
|
||||||
sigaction (SIGSEGV, &action, NULL);
|
sigaction (SIGSEGV, &oldaction, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -331,10 +329,12 @@ _gst_plugin_fault_handler_setup (void)
|
||||||
if (_gst_plugin_fault_handler_is_setup)
|
if (_gst_plugin_fault_handler_is_setup)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
_gst_plugin_fault_handler_is_setup = TRUE;
|
||||||
|
|
||||||
memset (&action, 0, sizeof (action));
|
memset (&action, 0, sizeof (action));
|
||||||
action.sa_handler = _gst_plugin_fault_handler_sighandler;
|
action.sa_handler = _gst_plugin_fault_handler_sighandler;
|
||||||
|
|
||||||
sigaction (SIGSEGV, &action, NULL);
|
sigaction (SIGSEGV, &action, &oldaction);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in a new issue