summaryrefslogtreecommitdiffstats
path: root/base/debug_util_mac.cc
diff options
context:
space:
mode:
authorjeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-13 17:07:59 +0000
committerjeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-13 17:07:59 +0000
commit20c74302b227db28d64ca8394be25f00b4f06fa2 (patch)
tree46cf75c8f113a7bd15de7fa8359b7077dcaf37e2 /base/debug_util_mac.cc
parentb3f901e83c60041fa6fd822364bd3580a710e200 (diff)
downloadchromium_src-20c74302b227db28d64ca8394be25f00b4f06fa2.zip
chromium_src-20c74302b227db28d64ca8394be25f00b4f06fa2.tar.gz
chromium_src-20c74302b227db28d64ca8394be25f00b4f06fa2.tar.bz2
Disable Native Crash reporting on OS X, till we enable Breakpad integration.
See http://crbug.com/7652 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9757 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/debug_util_mac.cc')
-rw-r--r--base/debug_util_mac.cc35
1 files changed, 35 insertions, 0 deletions
diff --git a/base/debug_util_mac.cc b/base/debug_util_mac.cc
new file mode 100644
index 0000000..3a1b184
--- /dev/null
+++ b/base/debug_util_mac.cc
@@ -0,0 +1,35 @@
+// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/debug_util.h"
+
+#include <signal.h>
+
+#include "base/basictypes.h"
+
+static void ExitSignalHandler(int sig) {
+ exit(128 + sig);
+}
+
+// static
+void DebugUtil::DisableOSCrashDumps() {
+ int signals_to_intercept[] ={SIGINT,
+ SIGHUP,
+ SIGTERM,
+ SIGABRT,
+ SIGILL,
+ SIGTRAP,
+ SIGEMT,
+ SIGFPE,
+ SIGBUS,
+ SIGSEGV,
+ SIGSYS,
+ SIGPIPE,
+ SIGXCPU,
+ SIGXFSZ};
+ // For all these signals, just wire thing sup so we exit immediately.
+ for (size_t i = 0; i < arraysize(signals_to_intercept); ++i) {
+ signal(signals_to_intercept[i], ExitSignalHandler);
+ }
+}