[RUNTIME] Ignore signal registration for debugging
It's difficult to identify native crash/error of 3rd party app.
Because they can control their app with own signal handling.
Therefore I would like to support the way to ignore signal
registration in 3rd party app with the specific property.
To enable this, do just setprop "debug.ignoreappsignalhandler 1".
Test: test app to hook signal, then setprop debug.ignoreappsignalhandler 1
Change-Id: I56e2f1255a71abae339396379deb8cb5c31c25c5
Merged-In: I56e2f1255a71abae339396379deb8cb5c31c25c5
Signed-off-by: randy.jeong <randy.jeong@samsung.com>
diff --git a/runtime/runtime.cc b/runtime/runtime.cc
index 4c16e05..fe64b8c 100644
--- a/runtime/runtime.cc
+++ b/runtime/runtime.cc
@@ -2921,4 +2921,8 @@
return startup_completed_.load(std::memory_order_seq_cst);
}
+void Runtime::SetSignalHookDebuggable(bool value) {
+ SkipAddSignalHandler(value);
+}
+
} // namespace art