Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(309)

Unified Diff: runtime/bin/process_macos.cc

Issue 10163004: Revert "Support passing an environment variable map to child processes." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/process_linux.cc ('k') | runtime/bin/process_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/process_macos.cc
diff --git a/runtime/bin/process_macos.cc b/runtime/bin/process_macos.cc
index 9f1b2bbd53b9ae50efae8d7260d25dd165580bef..c71aca369b5648eee86817e715ce297f536c3787 100644
--- a/runtime/bin/process_macos.cc
+++ b/runtime/bin/process_macos.cc
@@ -306,8 +306,6 @@ int Process::Start(const char* path,
char* arguments[],
intptr_t arguments_length,
const char* working_directory,
- char* environment[],
- intptr_t environment_length,
intptr_t* in,
intptr_t* out,
intptr_t* err,
@@ -391,21 +389,12 @@ int Process::Start(const char* path,
}
char** program_arguments = new char*[arguments_length + 2];
- program_arguments[0] = const_cast<char*>(path);
+ program_arguments[0] = const_cast<char *>(path);
for (int i = 0; i < arguments_length; i++) {
program_arguments[i + 1] = arguments[i];
}
program_arguments[arguments_length + 1] = NULL;
- char** program_environment = NULL;
- if (environment != NULL) {
- program_environment = new char*[environment_length + 1];
- for (int i = 0; i < environment_length; i++) {
- program_environment[i] = environment[i];
- }
- program_arguments[environment_length] = NULL;
- }
-
struct sigaction act;
bzero(&act, sizeof(act));
act.sa_sigaction = SigChldHandler;
@@ -460,22 +449,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)));
- }
+ TEMP_FAILURE_RETRY(
+ execvp(path, const_cast<char* const*>(program_arguments)));
ReportChildError(exec_control[1]);
}
- // The arguments and environment for the spawned process are not needed
- // any longer.
+ // The arguments for the spawned process are not needed any longer.
delete[] program_arguments;
- delete[] program_environment;
int event_fds[2];
result = TEMP_FAILURE_RETRY(pipe(event_fds));
« no previous file with comments | « runtime/bin/process_linux.cc ('k') | runtime/bin/process_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698