Merge "adb: Make HOME=/data/local/tmp" am: 5358093225 am: 65ab87dd9b

am: b87df11678

* commit 'b87df11678c22d56d02c776f8f91031bf81a963d':
  adb: Make HOME=/data/local/tmp
This commit is contained in:
Nick Kralevich 2015-12-08 05:06:19 +00:00 committed by android-build-merger
commit e042ff867c
1 changed files with 2 additions and 1 deletions

View File

@ -289,7 +289,6 @@ bool Subprocess::ForkAndExec() {
// TODO: $HOSTNAME? Normally bash automatically sets that, but mksh doesn't.
passwd* pw = getpwuid(getuid());
if (pw != nullptr) {
setenv("HOME", pw->pw_dir, 1);
setenv("LOGNAME", pw->pw_name, 1);
setenv("SHELL", pw->pw_shell, 1);
setenv("USER", pw->pw_name, 1);
@ -298,6 +297,8 @@ bool Subprocess::ForkAndExec() {
setenv("TERM", terminal_type_.c_str(), 1);
}
setenv("HOME", "/data/local/tmp", 1);
chdir(getenv("HOME"));
if (is_interactive()) {
execl(_PATH_BSHELL, _PATH_BSHELL, "-", nullptr);
} else {