Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make PrepareEnvironmentForJvm() explicitly inherit environment variab…
…les. The map returned by PrepareEnvironmentForJvm() previously represented a "delta" to apply to the current environment. This was used to modify the environment surrounding fork/execv calls because we could not pass an envp to execv. However, when using the resulting map to create the envp value of a call like posix_spawn, we must be exhaustive and list all variables we expect the subprocess to have. And as we are going to be using posix_spawn, we need to make this happen, so change PrepareEnvironmentForJvm() to make the returned map exhaustive. Prerequisite change to address bazelbuild#7446 because of the need to switch to posix_spawn. RELNOTES: None. PiperOrigin-RevId: 234971246
- Loading branch information