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

Side by Side Diff: runtime/bin/platform_linux.cc

Issue 2985963002: [standalone] Register a segfault handler on Android as already done on Linux. (Closed)
Patch Set: . Created 3 years, 4 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
« no previous file with comments | « runtime/bin/platform_android.cc ('k') | runtime/bin/platform_macos.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "platform/globals.h" 5 #include "platform/globals.h"
6 #if defined(HOST_OS_LINUX) 6 #if defined(HOST_OS_LINUX)
7 7
8 #include "bin/platform.h" 8 #include "bin/platform.h"
9 9
10 #include <signal.h> // NOLINT 10 #include <signal.h> // NOLINT
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 return false; 46 return false;
47 } 47 }
48 if (sigaddset(&act.sa_mask, SIGPROF) != 0) { 48 if (sigaddset(&act.sa_mask, SIGPROF) != 0) {
49 perror("sigaddset() failed"); 49 perror("sigaddset() failed");
50 return false; 50 return false;
51 } 51 }
52 if (sigaction(SIGSEGV, &act, NULL) != 0) { 52 if (sigaction(SIGSEGV, &act, NULL) != 0) {
53 perror("sigaction() failed."); 53 perror("sigaction() failed.");
54 return false; 54 return false;
55 } 55 }
56 if (sigaction(SIGBUS, &act, NULL) != 0) {
57 perror("sigaction() failed.");
58 return false;
59 }
56 if (sigaction(SIGTRAP, &act, NULL) != 0) { 60 if (sigaction(SIGTRAP, &act, NULL) != 0) {
57 perror("sigaction() failed."); 61 perror("sigaction() failed.");
58 return false; 62 return false;
59 } 63 }
60 return true; 64 return true;
61 } 65 }
62 66
63 int Platform::NumberOfProcessors() { 67 int Platform::NumberOfProcessors() {
64 return sysconf(_SC_NPROCESSORS_ONLN); 68 return sysconf(_SC_NPROCESSORS_ONLN);
65 } 69 }
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 } 118 }
115 119
116 void Platform::Exit(int exit_code) { 120 void Platform::Exit(int exit_code) {
117 exit(exit_code); 121 exit(exit_code);
118 } 122 }
119 123
120 } // namespace bin 124 } // namespace bin
121 } // namespace dart 125 } // namespace dart
122 126
123 #endif // defined(HOST_OS_LINUX) 127 #endif // defined(HOST_OS_LINUX)
OLDNEW
« no previous file with comments | « runtime/bin/platform_android.cc ('k') | runtime/bin/platform_macos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698