Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 1 addition & 12 deletions lldb/source/Host/posix/ProcessLauncherPosixFork.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,25 +230,14 @@ MakeForkActions(const ProcessLaunchInfo &info) {
return result;
}

static Environment::Envp FixupEnvironment(Environment env) {
#ifdef __ANDROID__
// If there is no PATH variable specified inside the environment then set the
// path to /system/bin. It is required because the default path used by
// execve() is wrong on android.
env.try_emplace("PATH", "/system/bin");
#endif
return env.getEnvp();
}

ForkLaunchInfo::ForkLaunchInfo(const ProcessLaunchInfo &info)
: separate_process_group(
info.GetFlags().Test(eLaunchFlagLaunchInSeparateProcessGroup)),
debug(info.GetFlags().Test(eLaunchFlagDebug)),
disable_aslr(info.GetFlags().Test(eLaunchFlagDisableASLR)),
wd(info.GetWorkingDirectory().GetPath()),
argv(info.GetArguments().GetConstArgumentVector()),
envp(FixupEnvironment(info.GetEnvironment())),
actions(MakeForkActions(info)) {}
envp(info.GetEnvironment().getEnvp()), actions(MakeForkActions(info)) {}

HostProcess
ProcessLauncherPosixFork::LaunchProcess(const ProcessLaunchInfo &launch_info,
Expand Down
Loading