summaryrefslogtreecommitdiffstats
path: root/cmds/app_process
diff options
context:
space:
mode:
authorNarayan Kamath <narayan@google.com>2014-04-10 12:13:06 +0100
committerNarayan Kamath <narayan@google.com>2014-04-10 12:15:39 +0100
commitd35d3e5d391b8daf20f9af2c5f01d5ff1985c1ee (patch)
treed5ffc966f3e4d3bf0711209213e73e03651d6749 /cmds/app_process
parent09e13cc5f9f98382376eb49bfa6ceb94a50d37a1 (diff)
downloadframeworks_base-d35d3e5d391b8daf20f9af2c5f01d5ff1985c1ee.zip
frameworks_base-d35d3e5d391b8daf20f9af2c5f01d5ff1985c1ee.tar.gz
frameworks_base-d35d3e5d391b8daf20f9af2c5f01d5ff1985c1ee.tar.bz2
Dual zygote cleanup.
- Use different process names for the 32 / 64 bit zygote. - Pass command line arguments correctly. The first unmatched argument must be passed through to the java main class. Change-Id: I952ebbdbba941f118d992354b9bd0ada2dade417
Diffstat (limited to 'cmds/app_process')
-rw-r--r--cmds/app_process/app_main.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/cmds/app_process/app_main.cpp b/cmds/app_process/app_main.cpp
index 3e8d6a0..c520b58 100644
--- a/cmds/app_process/app_main.cpp
+++ b/cmds/app_process/app_main.cpp
@@ -138,8 +138,10 @@ static size_t computeArgBlockSize(int argc, char* const argv[]) {
#if defined(__LP64__)
static const char ABI_LIST_PROPERTY[] = "ro.product.cpu.abilist64";
+static const char ZYGOTE_NICE_NAME[] = "zygote64";
#else
static const char ABI_LIST_PROPERTY[] = "ro.product.cpu.abilist32";
+static const char ZYGOTE_NICE_NAME[] = "zygote";
#endif
int main(int argc, char* const argv[])
@@ -185,16 +187,19 @@ int main(int argc, char* const argv[])
const char* arg = argv[i++];
if (strcmp(arg, "--zygote") == 0) {
zygote = true;
- niceName = "zygote";
+ niceName = ZYGOTE_NICE_NAME;
} else if (strcmp(arg, "--start-system-server") == 0) {
startSystemServer = true;
} else if (strcmp(arg, "--application") == 0) {
application = true;
} else if (strncmp(arg, "--nice-name=", 12) == 0) {
niceName = arg + 12;
- } else {
+ } else if (strncmp(arg, "--", 2) != 0) {
className.setTo(arg);
break;
+ } else {
+ --i;
+ break;
}
}