Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(115)

Side by Side Diff: base/debug_util_mac.cc

Issue 115493: Fix for breakpad not generating a minidump in certain cases on OSX. (Closed)
Patch Set: Created 11 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/debug_util.h" 5 #include "base/debug_util.h"
6 6
7 #include <signal.h> 7 #include <signal.h>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 10
11 static void ExitSignalHandler(int sig) { 11 static void ExitSignalHandler(int sig) {
12 exit(128 + sig); 12 exit(128 + sig);
13 } 13 }
14 14
15 // static 15 // static
16 void DebugUtil::DisableOSCrashDumps() { 16 void DebugUtil::DisableOSCrashDumps() {
17 int signals_to_intercept[] ={SIGINT, 17 int signals_to_intercept[] ={SIGINT,
18 SIGHUP, 18 SIGHUP,
19 SIGTERM, 19 SIGTERM,
20 SIGABRT, 20 SIGABRT,
21 SIGILL, 21 SIGILL,
22 SIGTRAP, 22 SIGTRAP,
23 SIGEMT, 23 SIGEMT,
24 SIGFPE, 24 SIGFPE,
25 SIGBUS, 25 SIGBUS,
26 SIGSEGV, 26 SIGSEGV,
27 SIGSYS, 27 SIGSYS,
28 SIGPIPE,
29 SIGXCPU, 28 SIGXCPU,
30 SIGXFSZ}; 29 SIGXFSZ};
31 // For all these signals, just wire thing sup so we exit immediately. 30 // For all these signals, just wire things up so we exit immediately.
32 for (size_t i = 0; i < arraysize(signals_to_intercept); ++i) { 31 for (size_t i = 0; i < arraysize(signals_to_intercept); ++i) {
33 signal(signals_to_intercept[i], ExitSignalHandler); 32 signal(signals_to_intercept[i], ExitSignalHandler);
34 } 33 }
35 } 34 }
OLDNEW
« no previous file with comments | « DEPS ('k') | chrome/app/breakpad_mac.mm » ('j') | chrome/app/breakpad_mac.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698