39 |
|
#include <limits.h> |
40 |
|
#include "vm_alloc.h" |
41 |
|
|
42 |
+ |
#if defined(__APPLE__) && defined(__MACH__) |
43 |
+ |
#include <sys/utsname.h> |
44 |
+ |
#endif |
45 |
+ |
|
46 |
|
#ifdef HAVE_MACH_VM |
47 |
|
#ifndef HAVE_MACH_TASK_SELF |
48 |
|
#ifdef HAVE_TASK_SELF |
185 |
|
return -1; |
186 |
|
#endif |
187 |
|
#endif |
188 |
+ |
|
189 |
+ |
// On 10.4 and earlier, reset CrashReporter's task signal handler to |
190 |
+ |
// avoid having it show up for signals that get handled. |
191 |
+ |
#if defined(__APPLE__) && defined(__MACH__) |
192 |
+ |
struct utsname info; |
193 |
+ |
|
194 |
+ |
if (!uname(&info) && atoi(info.release) <= 8) { |
195 |
+ |
task_set_exception_ports(mach_task_self(), |
196 |
+ |
EXC_MASK_BAD_ACCESS | EXC_MASK_ARITHMETIC, |
197 |
+ |
MACH_PORT_NULL, |
198 |
+ |
EXCEPTION_STATE_IDENTITY, |
199 |
+ |
MACHINE_THREAD_STATE); |
200 |
+ |
} |
201 |
+ |
#endif |
202 |
+ |
|
203 |
|
return 0; |
204 |
|
} |
205 |
|
|