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

Unified Diff: src/trusted/service_runtime/sel_main.c

Issue 12278019: Mac: Enable Mach exception handler by default Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Rebase Created 7 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/trusted/service_runtime/osx/mach_exception_handler.c ('k') | tools/command_tester.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/trusted/service_runtime/sel_main.c
diff --git a/src/trusted/service_runtime/sel_main.c b/src/trusted/service_runtime/sel_main.c
index 2caf1bea98ab475f5208cfe394c6da137e840bee..fdfb85f05b1fc7d206a21ea4fc5eb3309dd2fe71 100644
--- a/src/trusted/service_runtime/sel_main.c
+++ b/src/trusted/service_runtime/sel_main.c
@@ -485,10 +485,6 @@ int NaClSelLdrMain(int argc, char **argv) {
#elif NACL_LINUX
/* NaCl's signal handler is always enabled on Linux. */
#elif NACL_OSX
- if (!NaClInterceptMachExceptions()) {
- fprintf(stderr, "ERROR setting up Mach exception interception.\n");
- return -1;
- }
#else
# error Unknown host OS
#endif
@@ -496,6 +492,12 @@ int NaClSelLdrMain(int argc, char **argv) {
if (NACL_LINUX) {
handle_signals = 1;
}
+#if NACL_OSX
+ if (!NaClInterceptMachExceptions()) {
+ fprintf(stderr, "ERROR setting up Mach exception interception.\n");
+ return -1;
+ }
+#endif
errcode = LOAD_OK;
@@ -534,7 +536,9 @@ int NaClSelLdrMain(int argc, char **argv) {
}
if (handle_signals) {
+#if NACL_LINUX
NaClSignalHandlerInit();
+#endif
} else {
/*
* Patch the Windows exception dispatcher to be safe in the case
« no previous file with comments | « src/trusted/service_runtime/osx/mach_exception_handler.c ('k') | tools/command_tester.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698