Loading adb/shell_service.cpp +12 −7 Original line number Diff line number Diff line Loading @@ -250,14 +250,19 @@ bool Subprocess::ForkAndExec() { // Construct the environment for the child before we fork. passwd* pw = getpwuid(getuid()); std::unordered_map<std::string, std::string> env; if (environ) { char** current = environ; while (char* env_cstr = *current++) { std::string env_string = env_cstr; char* delimiter = strchr(env_string.c_str(), '='); // Drop any values that don't contain '='. if (delimiter) { *delimiter++ = '\0'; env[env_string.c_str()] = delimiter; } } } if (pw != nullptr) { // TODO: $HOSTNAME? Normally bash automatically sets that, but mksh doesn't. Loading Loading
adb/shell_service.cpp +12 −7 Original line number Diff line number Diff line Loading @@ -250,14 +250,19 @@ bool Subprocess::ForkAndExec() { // Construct the environment for the child before we fork. passwd* pw = getpwuid(getuid()); std::unordered_map<std::string, std::string> env; if (environ) { char** current = environ; while (char* env_cstr = *current++) { std::string env_string = env_cstr; char* delimiter = strchr(env_string.c_str(), '='); // Drop any values that don't contain '='. if (delimiter) { *delimiter++ = '\0'; env[env_string.c_str()] = delimiter; } } } if (pw != nullptr) { // TODO: $HOSTNAME? Normally bash automatically sets that, but mksh doesn't. Loading