Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a7a66f40 authored by Josh Gao's avatar Josh Gao Committed by android-build-merger
Browse files

Merge "adbd: spawn login shell when run without a command."

am: 31ed2a5c

Change-Id: I133b09a0a153cb660186126106bceca76b0cba24
parents 1919289d 31ed2a5c
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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());
        }