| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include <process.h> | 5 #include <process.h> |
| 6 | 6 |
| 7 #include "bin/builtin.h" | 7 #include "bin/builtin.h" |
| 8 #include "bin/process.h" | 8 #include "bin/process.h" |
| 9 #include "bin/eventhandler.h" | 9 #include "bin/eventhandler.h" |
| 10 #include "bin/thread.h" | 10 #include "bin/thread.h" |
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 return error_code; | 384 return error_code; |
| 385 } | 385 } |
| 386 | 386 |
| 387 // Setup info structures. | 387 // Setup info structures. |
| 388 STARTUPINFO startup_info; | 388 STARTUPINFO startup_info; |
| 389 ZeroMemory(&startup_info, sizeof(startup_info)); | 389 ZeroMemory(&startup_info, sizeof(startup_info)); |
| 390 startup_info.cb = sizeof(startup_info); | 390 startup_info.cb = sizeof(startup_info); |
| 391 startup_info.hStdInput = stdin_handles[kReadHandle]; | 391 startup_info.hStdInput = stdin_handles[kReadHandle]; |
| 392 startup_info.hStdOutput = stdout_handles[kWriteHandle]; | 392 startup_info.hStdOutput = stdout_handles[kWriteHandle]; |
| 393 startup_info.hStdError = stderr_handles[kWriteHandle]; | 393 startup_info.hStdError = stderr_handles[kWriteHandle]; |
| 394 startup_info.dwFlags |= STARTF_USESTDHANDLES; | 394 startup_info.dwFlags = STARTF_USESTDHANDLES; |
| 395 | 395 |
| 396 PROCESS_INFORMATION process_info; | 396 PROCESS_INFORMATION process_info; |
| 397 ZeroMemory(&process_info, sizeof(process_info)); | 397 ZeroMemory(&process_info, sizeof(process_info)); |
| 398 | 398 |
| 399 // Compute command-line length. | 399 // Compute command-line length. |
| 400 int command_line_length = strlen(path); | 400 int command_line_length = strlen(path); |
| 401 for (int i = 0; i < arguments_length; i++) { | 401 for (int i = 0; i < arguments_length; i++) { |
| 402 command_line_length += strlen(arguments[i]); | 402 command_line_length += strlen(arguments[i]); |
| 403 } | 403 } |
| 404 // Account for null termination and one space per argument. | 404 // Account for null termination and one space per argument. |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 if (!result) { | 514 if (!result) { |
| 515 return false; | 515 return false; |
| 516 } | 516 } |
| 517 return true; | 517 return true; |
| 518 } | 518 } |
| 519 | 519 |
| 520 | 520 |
| 521 void Process::TerminateExitCodeHandler() { | 521 void Process::TerminateExitCodeHandler() { |
| 522 // Nothing needs to be done on Windows. | 522 // Nothing needs to be done on Windows. |
| 523 } | 523 } |
| 524 | |
| OLD | NEW |