From a9bd8c3e5641bba3dc97d97ce840b5657c82d277 Mon Sep 17 00:00:00 2001 From: Martin Stjernholm Date: Sat, 23 Feb 2019 02:35:07 +0000 Subject: [PATCH] Log the pid of the forked zygote child. Useful to link together the pids of the zygote and its children in logcat output. Test: Flash and boot, run "adb logcat" Change-Id: I524b70aed7d1ce7a378df0e2b2063e23f1f9a454 --- core/jni/com_android_internal_os_Zygote.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/jni/com_android_internal_os_Zygote.cpp b/core/jni/com_android_internal_os_Zygote.cpp index bc1332adacbca..8216b616915c5 100644 --- a/core/jni/com_android_internal_os_Zygote.cpp +++ b/core/jni/com_android_internal_os_Zygote.cpp @@ -892,6 +892,8 @@ static pid_t ForkCommon(JNIEnv* env, bool is_system_server, // Turn fdsan back on. android_fdsan_set_error_level(fdsan_error_level); + } else { + ALOGD("Forked child process %d", pid); } // We blocked SIGCHLD prior to a fork, we unblock it here.