| Index: runtime/bin/process_linux.cc
|
| diff --git a/runtime/bin/process_linux.cc b/runtime/bin/process_linux.cc
|
| index bfaf4d4bf4aa933b05b40a4a8b90105f5c3b7782..ffc5c88532ef4a71ab7b391bf037e8d4f4e527ac 100644
|
| --- a/runtime/bin/process_linux.cc
|
| +++ b/runtime/bin/process_linux.cc
|
| @@ -17,6 +17,7 @@
|
| #include "bin/fdutils.h"
|
| #include "bin/thread.h"
|
|
|
| +extern char **environ;
|
|
|
| // ProcessInfo is used to map a process id to the file descriptor for
|
| // the pipe used to communicate the exit code of the process to Dart.
|
| @@ -461,15 +462,13 @@ int Process::Start(const char* path,
|
| ReportChildError(exec_control[1]);
|
| }
|
|
|
| - if (environment != NULL) {
|
| - TEMP_FAILURE_RETRY(
|
| - execve(path,
|
| - const_cast<char* const*>(program_arguments),
|
| - program_environment));
|
| - } else {
|
| - TEMP_FAILURE_RETRY(
|
| - execvp(path, const_cast<char* const*>(program_arguments)));
|
| + if (program_environment != NULL) {
|
| + environ = program_environment;
|
| }
|
| +
|
| + TEMP_FAILURE_RETRY(
|
| + execvp(path, const_cast<char* const*>(program_arguments)));
|
| +
|
| ReportChildError(exec_control[1]);
|
| }
|
|
|
|
|