Ignore signal registration for debugging
am: 3ea9580a29
Change-Id: I90f90104e68b4911f15bbfc1dfc3407320b86564
diff --git a/core/java/com/android/internal/os/Zygote.java b/core/java/com/android/internal/os/Zygote.java
index 2ba9cf1..46e041b 100644
--- a/core/java/com/android/internal/os/Zygote.java
+++ b/core/java/com/android/internal/os/Zygote.java
@@ -106,6 +106,14 @@
*/
public static final int USE_APP_IMAGE_STARTUP_CACHE = 1 << 16;
+ /**
+ * When set, application specified signal handlers are not chained (i.e, ignored)
+ * by the runtime.
+ *
+ * Used for debugging only. Usage: set debug.ignoreappsignalhandler to 1.
+ */
+ public static final int DEBUG_IGNORE_APP_SIGNAL_HANDLER = 1 << 17;
+
/** No external storage should be mounted. */
public static final int MOUNT_EXTERNAL_NONE = IVold.REMOUNT_MODE_NONE;
/** Default external storage should be mounted. */
diff --git a/services/core/java/com/android/server/am/ProcessList.java b/services/core/java/com/android/server/am/ProcessList.java
index b399971..3d598dd 100644
--- a/services/core/java/com/android/server/am/ProcessList.java
+++ b/services/core/java/com/android/server/am/ProcessList.java
@@ -1544,6 +1544,9 @@
if ("1".equals(SystemProperties.get("debug.assert"))) {
runtimeFlags |= Zygote.DEBUG_ENABLE_ASSERT;
}
+ if ("1".equals(SystemProperties.get("debug.ignoreappsignalhandler"))) {
+ runtimeFlags |= Zygote.DEBUG_IGNORE_APP_SIGNAL_HANDLER;
+ }
if (mService.mNativeDebuggingApp != null
&& mService.mNativeDebuggingApp.equals(app.processName)) {
// Enable all debug flags required by the native debugger.