summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator.cpp
diff options
context:
space:
mode:
authorRobert Sesek <rsesek@google.com>2018-02-12 18:46:01 -0500
committerRobert Sesek <rsesek@google.com>2018-02-16 14:17:41 -0500
commitd0a190df8a04e10a6705148c02c5c4859ad75b70 (patch)
tree35ce966a8d98e6a56113fd1f7a8dc7e299fe22ee /tools/aapt2/java/JavaClassGenerator.cpp
parent2c8456b22e7d9c66de9ae70f0a79582499a7b61d (diff)
Add Zygote.startChildZygote() to fork a new process that itself is a zygote.
This adds a new --start-child-zygote argument that instructs the main zygote to create a new child process that will also be a zygote. The system_server generates a random name in the abstract socket namespace for it and the child-zygote to communicate over, and that is passed as an argument to the new process. A child-zygote bypasses the normal post-fork-child of the zygote process in order to preserve itself as a zygote. This means not starting the Binder threadpool nor launching into ActivityThread. Instead, a child-zygote calls into its own main function. The main function runs a ZygoteServer select loop, listening on the socket name specified by the system_server when it was forked. Unlike the system zygotes, a child-zygote can be killed without bringing down the system. Killing a child-zygote will not terminate its child processes, which will be reparented to init for reaping when they eventually exit. Bug: 63749735 Test: m (with multi-project commits landed) Change-Id: I3e7ebbdba498f8fec1d84cdf927dc43a92be4b68
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator.cpp')
0 files changed, 0 insertions, 0 deletions