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

Side by Side Diff: runtime/bin/process_macos.cc

Issue 1171223003: Add stubs in platform_macos and file_system_watcher_macos for building the same (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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 unified diff | Download patch
« runtime/bin/platform_macos.cc ('K') | « runtime/bin/platform_macos.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #if !defined(TARGET_OS_IOS)
10 #include <crt_externs.h> // NOLINT 11 #include <crt_externs.h> // NOLINT
12 #endif
11 #include <errno.h> // NOLINT 13 #include <errno.h> // NOLINT
12 #include <fcntl.h> // NOLINT 14 #include <fcntl.h> // NOLINT
13 #include <poll.h> // NOLINT 15 #include <poll.h> // NOLINT
14 #include <signal.h> // NOLINT 16 #include <signal.h> // NOLINT
15 #include <stdio.h> // NOLINT 17 #include <stdio.h> // NOLINT
16 #include <stdlib.h> // NOLINT 18 #include <stdlib.h> // NOLINT
17 #include <string.h> // NOLINT 19 #include <string.h> // NOLINT
18 #include <unistd.h> // NOLINT 20 #include <unistd.h> // NOLINT
19 21
20 #include "bin/fdutils.h" 22 #include "bin/fdutils.h"
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 444
443 if (TEMP_FAILURE_RETRY(dup2(read_err_[1], STDERR_FILENO)) == -1) { 445 if (TEMP_FAILURE_RETRY(dup2(read_err_[1], STDERR_FILENO)) == -1) {
444 ReportChildError(); 446 ReportChildError();
445 } 447 }
446 448
447 if (working_directory_ != NULL && 449 if (working_directory_ != NULL &&
448 TEMP_FAILURE_RETRY(chdir(working_directory_)) == -1) { 450 TEMP_FAILURE_RETRY(chdir(working_directory_)) == -1) {
449 ReportChildError(); 451 ReportChildError();
450 } 452 }
451 453
454 #if !defined(TARGET_OS_IOS)
452 if (program_environment_ != NULL) { 455 if (program_environment_ != NULL) {
453 // On MacOS you have to do a bit of magic to get to the 456 // On MacOS you have to do a bit of magic to get to the
454 // environment strings. 457 // environment strings.
455 char*** environ = _NSGetEnviron(); 458 char*** environ = _NSGetEnviron();
456 *environ = program_environment_; 459 *environ = program_environment_;
457 } 460 }
461 #endif
458 462
459 VOID_TEMP_FAILURE_RETRY( 463 VOID_TEMP_FAILURE_RETRY(
460 execvp(path_, const_cast<char* const*>(program_arguments_))); 464 execvp(path_, const_cast<char* const*>(program_arguments_)));
461 465
462 ReportChildError(); 466 ReportChildError();
463 } 467 }
464 468
465 469
466 void ExecDetachedProcess() { 470 void ExecDetachedProcess() {
467 if (mode_ == kDetached) { 471 if (mode_ == kDetached) {
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after
1058 bzero(&act, sizeof(act)); 1062 bzero(&act, sizeof(act));
1059 act.sa_handler = SIG_DFL; 1063 act.sa_handler = SIG_DFL;
1060 VOID_NO_RETRY_EXPECTED(sigaction(signal, &act, NULL)); 1064 VOID_NO_RETRY_EXPECTED(sigaction(signal, &act, NULL));
1061 } 1065 }
1062 } 1066 }
1063 1067
1064 } // namespace bin 1068 } // namespace bin
1065 } // namespace dart 1069 } // namespace dart
1066 1070
1067 #endif // defined(TARGET_OS_MACOS) 1071 #endif // defined(TARGET_OS_MACOS)
OLDNEW
« runtime/bin/platform_macos.cc ('K') | « runtime/bin/platform_macos.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698