| Index: runtime/bin/process.cc
|
| diff --git a/runtime/bin/process.cc b/runtime/bin/process.cc
|
| index fecb5aa500abaf990416dfed205cdc54cd9a34a8..52035301c3877989d9e5defa62bc1a87cf503dcb 100644
|
| --- a/runtime/bin/process.cc
|
| +++ b/runtime/bin/process.cc
|
| @@ -65,7 +65,7 @@ void FUNCTION_NAME(Process_Start)(Dart_NativeArguments args) {
|
| intptr_t process_stdout;
|
| intptr_t process_stderr;
|
| intptr_t exit_event;
|
| - Dart_Handle status_handle = Dart_GetNativeArgument(args, 9);
|
| + Dart_Handle status_handle = Dart_GetNativeArgument(args, 10);
|
| Dart_Handle path_handle = Dart_GetNativeArgument(args, 1);
|
| // The Dart code verifies that the path implements the String
|
| // interface. However, only builtin Strings are handled by
|
| @@ -118,10 +118,11 @@ void FUNCTION_NAME(Process_Start)(Dart_NativeArguments args) {
|
| return;
|
| }
|
| }
|
| - Dart_Handle stdin_handle = Dart_GetNativeArgument(args, 5);
|
| - Dart_Handle stdout_handle = Dart_GetNativeArgument(args, 6);
|
| - Dart_Handle stderr_handle = Dart_GetNativeArgument(args, 7);
|
| - Dart_Handle exit_handle = Dart_GetNativeArgument(args, 8);
|
| + bool detached = DartUtils::GetBooleanValue(Dart_GetNativeArgument(args, 5));
|
| + Dart_Handle stdin_handle = Dart_GetNativeArgument(args, 6);
|
| + Dart_Handle stdout_handle = Dart_GetNativeArgument(args, 7);
|
| + Dart_Handle stderr_handle = Dart_GetNativeArgument(args, 8);
|
| + Dart_Handle exit_handle = Dart_GetNativeArgument(args, 9);
|
| intptr_t pid = -1;
|
| char* os_error_message = NULL;
|
|
|
| @@ -131,6 +132,7 @@ void FUNCTION_NAME(Process_Start)(Dart_NativeArguments args) {
|
| working_directory,
|
| string_environment,
|
| environment_length,
|
| + detached,
|
| &process_stdout,
|
| &process_stdin,
|
| &process_stderr,
|
| @@ -138,10 +140,12 @@ void FUNCTION_NAME(Process_Start)(Dart_NativeArguments args) {
|
| &exit_event,
|
| &os_error_message);
|
| if (error_code == 0) {
|
| - Socket::SetSocketIdNativeField(stdin_handle, process_stdin);
|
| - Socket::SetSocketIdNativeField(stdout_handle, process_stdout);
|
| - Socket::SetSocketIdNativeField(stderr_handle, process_stderr);
|
| - Socket::SetSocketIdNativeField(exit_handle, exit_event);
|
| + if (!detached) {
|
| + Socket::SetSocketIdNativeField(stdin_handle, process_stdin);
|
| + Socket::SetSocketIdNativeField(stdout_handle, process_stdout);
|
| + Socket::SetSocketIdNativeField(stderr_handle, process_stderr);
|
| + Socket::SetSocketIdNativeField(exit_handle, exit_event);
|
| + }
|
| Process::SetProcessIdNativeField(process, pid);
|
| } else {
|
| DartUtils::SetIntegerField(
|
|
|