Merge "Log the errno if calling fork() fails"

This commit is contained in:
Treehugger Robot
2022-08-01 18:47:30 +00:00
committed by Gerrit Code Review

View File

@@ -2127,6 +2127,8 @@ pid_t zygote::ForkCommon(JNIEnv* env, bool is_system_server,
// Reset the fd to the unsolicited zygote socket
gSystemServerSocketFd = -1;
} else if (pid == -1) {
ALOGE("Failed to fork child process: %s (%d)", strerror(errno), errno);
} else {
ALOGD("Forked child process %d", pid);
}