diff options
author | Jeremy Huddleston <jeremyhu@apple.com> | 2011-01-23 22:35:34 -0800 |
---|---|---|
committer | Jeremy Huddleston <jeremyhu@apple.com> | 2011-01-23 22:39:44 -0800 |
commit | effaf9459c450f13e35bf263835d3e37d48ff29d (patch) | |
tree | b2cbe2e61eefa4e4e59778b3e858637275feebf9 | |
parent | 418bb57a3923311338baa8a85c0794a72e15ceeb (diff) |
XQuartz: Use the default signal handler
This allows better interaction with CrashTracer
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
-rw-r--r-- | hw/xquartz/quartz.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/hw/xquartz/quartz.c b/hw/xquartz/quartz.c index 156de1395..222a5eab0 100644 --- a/hw/xquartz/quartz.c +++ b/hw/xquartz/quartz.c @@ -63,6 +63,7 @@ #include <fcntl.h> #include <IOKit/pwr_mgt/IOPMLib.h> #include <pthread.h> +#include <signal.h> #include <rootlessCommon.h> #include <Xplugin.h> @@ -143,6 +144,26 @@ void QuartzInitOutput( int argc, char **argv ) { + /* For XQuartz, we want to just use the default signal handler to work better with CrashTracer */ + signal(SIGSEGV, SIG_DFL); + signal(SIGILL, SIG_DFL); +#ifdef SIGEMT + signal(SIGEMT, SIG_DFL); +#endif + signal(SIGFPE, SIG_DFL); +#ifdef SIGBUS + signal(SIGBUS, SIG_DFL); +#endif +#ifdef SIGSYS + signal(SIGSYS, SIG_DFL); +#endif +#ifdef SIGXCPU + signal(SIGXCPU, SIG_DFL); +#endif +#ifdef SIGXFSZ + signal(SIGXFSZ, SIG_DFL); +#endif + if (!RegisterBlockAndWakeupHandlers(QuartzBlockHandler, QuartzWakeupHandler, NULL)) |