Merge "Updated Zygote IPC related comments."

am: f8881b6821

Change-Id: I4b69e3347f776e70711bcca2c52505de79eccef7
This commit is contained in:
Christian Wailes
2019-02-20 15:30:04 -08:00
committed by android-build-merger
3 changed files with 13 additions and 15 deletions

View File

@@ -366,8 +366,8 @@ public class ZygoteProcess {
}
}
/**
* See com.android.internal.os.SystemZygoteInit.readArgumentList()
/*
* See com.android.internal.os.ZygoteArguments.parseArgs()
* Presently the wire format to the zygote process is:
* a) a count of arguments (argc, in essence)
* b) a number of newline-separated argument strings equal to count

View File

@@ -731,17 +731,6 @@ public final class Zygote {
* @throws IOException passed straight through
*/
static String[] readArgumentList(BufferedReader socketReader) throws IOException {
/**
* See android.os.Process.zygoteSendArgsAndGetPid()
* Presently the wire format to the zygote process is:
* a) a count of arguments (argc, in essence)
* b) a number of newline-separated argument strings equal to count
*
* After the zygote process reads these it will write the pid of
* the child or -1 on failure.
*/
int argc;
try {

View File

@@ -196,8 +196,17 @@ class ZygoteArguments {
* Per security review bug #1112214, duplicate args are disallowed in critical cases to make
* injection harder.
*/
private void parseArgs(String[] args)
throws IllegalArgumentException {
private void parseArgs(String[] args) throws IllegalArgumentException {
/*
* See android.os.ZygoteProcess.zygoteSendArgsAndGetResult()
* Presently the wire format to the zygote process is:
* a) a count of arguments (argc, in essence)
* b) a number of newline-separated argument strings equal to count
*
* After the zygote process reads these it will write the pid of
* the child or -1 on failure.
*/
int curArg = 0;
boolean seenRuntimeArgs = false;