OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/mac/os_crash_dumps.h" | 5 #include <sys/signal.h> |
6 | |
7 #include <signal.h> | |
8 #include <unistd.h> | 6 #include <unistd.h> |
9 | 7 |
10 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
11 | 9 |
12 namespace base { | 10 namespace base { |
13 namespace mac { | 11 namespace mac { |
14 | 12 |
15 namespace { | 13 namespace { |
16 | 14 |
17 void ExitSignalHandler(int sig) { | 15 void ExitSignalHandler(int sig) { |
(...skipping 18 matching lines...) Expand all Loading... |
36 SIGSEGV // EXC_BAD_ACCESS | 34 SIGSEGV // EXC_BAD_ACCESS |
37 }; | 35 }; |
38 | 36 |
39 // For all these signals, just wire things up so we exit immediately. | 37 // For all these signals, just wire things up so we exit immediately. |
40 for (size_t i = 0; i < arraysize(signals_to_intercept); ++i) | 38 for (size_t i = 0; i < arraysize(signals_to_intercept); ++i) |
41 signal(signals_to_intercept[i], ExitSignalHandler); | 39 signal(signals_to_intercept[i], ExitSignalHandler); |
42 } | 40 } |
43 | 41 |
44 } // namespace mac | 42 } // namespace mac |
45 } // namespace base | 43 } // namespace base |
OLD | NEW |