| 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 "platform/globals.h" | 5 #include "platform/globals.h" |
| 6 #if defined(TARGET_OS_MACOS) | 6 #if defined(TARGET_OS_MACOS) |
| 7 | 7 |
| 8 #include "bin/process.h" | 8 #include "bin/process.h" |
| 9 | 9 |
| 10 #include <crt_externs.h> // NOLINT | 10 #include <crt_externs.h> // NOLINT |
| (...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 451 | 451 |
| 452 if (working_directory_ != NULL && | 452 if (working_directory_ != NULL && |
| 453 TEMP_FAILURE_RETRY(chdir(working_directory_)) == -1) { | 453 TEMP_FAILURE_RETRY(chdir(working_directory_)) == -1) { |
| 454 ReportChildError(); | 454 ReportChildError(); |
| 455 } | 455 } |
| 456 | 456 |
| 457 if (program_environment_ != NULL) { | 457 if (program_environment_ != NULL) { |
| 458 // On MacOS you have to do a bit of magic to get to the | 458 // On MacOS you have to do a bit of magic to get to the |
| 459 // environment strings. | 459 // environment strings. |
| 460 char*** environ = _NSGetEnviron(); | 460 char*** environ = _NSGetEnviron(); |
| 461 *environ = program_environment; | 461 *environ = program_environment_; |
| 462 } | 462 } |
| 463 | 463 |
| 464 VOID_TEMP_FAILURE_RETRY( | 464 VOID_TEMP_FAILURE_RETRY( |
| 465 execvp(path_, const_cast<char* const*>(program_arguments_))); | 465 execvp(path_, const_cast<char* const*>(program_arguments_))); |
| 466 | 466 |
| 467 ReportChildError(); | 467 ReportChildError(); |
| 468 } | 468 } |
| 469 | 469 |
| 470 | 470 |
| 471 void ExecDetachedProcess() { | 471 void ExecDetachedProcess() { |
| (...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1009 bzero(&act, sizeof(act)); | 1009 bzero(&act, sizeof(act)); |
| 1010 act.sa_handler = SIG_DFL; | 1010 act.sa_handler = SIG_DFL; |
| 1011 VOID_NO_RETRY_EXPECTED(sigaction(signal, &act, NULL)); | 1011 VOID_NO_RETRY_EXPECTED(sigaction(signal, &act, NULL)); |
| 1012 } | 1012 } |
| 1013 } | 1013 } |
| 1014 | 1014 |
| 1015 } // namespace bin | 1015 } // namespace bin |
| 1016 } // namespace dart | 1016 } // namespace dart |
| 1017 | 1017 |
| 1018 #endif // defined(TARGET_OS_MACOS) | 1018 #endif // defined(TARGET_OS_MACOS) |
| OLD | NEW |