Merge "adbd: spawn login shell when run without a command."
This commit is contained in:
commit
31ed2a5c04
1 changed files with 2 additions and 1 deletions
|
|
@ -344,7 +344,8 @@ bool Subprocess::ForkAndExec(std::string* error) {
|
|||
}
|
||||
|
||||
if (command_.empty()) {
|
||||
execle(_PATH_BSHELL, _PATH_BSHELL, "-", nullptr, cenv.data());
|
||||
// Spawn a login shell if we don't have a command.
|
||||
execle(_PATH_BSHELL, "-" _PATH_BSHELL, nullptr, cenv.data());
|
||||
} else {
|
||||
execle(_PATH_BSHELL, _PATH_BSHELL, "-c", command_.c_str(), nullptr, cenv.data());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue