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

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

Issue 3001963002: [dart:io] Namespaces for file IO (Closed)
Patch Set: Fuchsia fix Created 3 years, 3 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
« no previous file with comments | « runtime/bin/process_linux.cc ('k') | runtime/bin/process_patch.dart » ('j') | 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(HOST_OS_MACOS) 6 #if defined(HOST_OS_MACOS)
7 7
8 #include "bin/process.h" 8 #include "bin/process.h"
9 9
10 #if !HOST_OS_IOS 10 #if !HOST_OS_IOS
11 #include <crt_externs.h> // NOLINT 11 #include <crt_externs.h> // NOLINT
12 #endif 12 #endif
13 #include <errno.h> // NOLINT 13 #include <errno.h> // NOLINT
14 #include <fcntl.h> // NOLINT 14 #include <fcntl.h> // NOLINT
15 #include <mach/mach.h> // NOLINT 15 #include <mach/mach.h> // NOLINT
16 #include <poll.h> // NOLINT 16 #include <poll.h> // NOLINT
17 #include <signal.h> // NOLINT 17 #include <signal.h> // NOLINT
18 #include <stdio.h> // NOLINT 18 #include <stdio.h> // NOLINT
19 #include <stdlib.h> // NOLINT 19 #include <stdlib.h> // NOLINT
20 #include <string.h> // NOLINT 20 #include <string.h> // NOLINT
21 #include <unistd.h> // NOLINT 21 #include <unistd.h> // NOLINT
22 22
23 #include "bin/dartutils.h" 23 #include "bin/dartutils.h"
24 #include "bin/fdutils.h" 24 #include "bin/fdutils.h"
25 #include "bin/lockers.h" 25 #include "bin/lockers.h"
26 #include "bin/log.h" 26 #include "bin/log.h"
27 #include "bin/namespace.h"
27 #include "bin/thread.h" 28 #include "bin/thread.h"
28 29
29 #include "platform/signal_blocker.h" 30 #include "platform/signal_blocker.h"
30 #include "platform/utils.h" 31 #include "platform/utils.h"
31 32
32 namespace dart { 33 namespace dart {
33 namespace bin { 34 namespace bin {
34 35
35 int Process::global_exit_code_ = 0; 36 int Process::global_exit_code_ = 0;
36 Mutex* Process::global_exit_code_mutex_ = new Mutex(); 37 Mutex* Process::global_exit_code_mutex_ = new Mutex();
(...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after
732 intptr_t* out_; 733 intptr_t* out_;
733 intptr_t* err_; 734 intptr_t* err_;
734 intptr_t* id_; 735 intptr_t* id_;
735 intptr_t* exit_event_; 736 intptr_t* exit_event_;
736 char** os_error_message_; 737 char** os_error_message_;
737 738
738 DISALLOW_ALLOCATION(); 739 DISALLOW_ALLOCATION();
739 DISALLOW_IMPLICIT_CONSTRUCTORS(ProcessStarter); 740 DISALLOW_IMPLICIT_CONSTRUCTORS(ProcessStarter);
740 }; 741 };
741 742
742 int Process::Start(const char* path, 743 int Process::Start(Namespace* namespc,
744 const char* path,
743 char* arguments[], 745 char* arguments[],
744 intptr_t arguments_length, 746 intptr_t arguments_length,
745 const char* working_directory, 747 const char* working_directory,
746 char* environment[], 748 char* environment[],
747 intptr_t environment_length, 749 intptr_t environment_length,
748 ProcessStartMode mode, 750 ProcessStartMode mode,
749 intptr_t* in, 751 intptr_t* in,
750 intptr_t* out, 752 intptr_t* out,
751 intptr_t* err, 753 intptr_t* err,
752 intptr_t* id, 754 intptr_t* id,
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
1073 bzero(&act, sizeof(act)); 1075 bzero(&act, sizeof(act));
1074 act.sa_handler = SIG_DFL; 1076 act.sa_handler = SIG_DFL;
1075 VOID_NO_RETRY_EXPECTED(sigaction(signal, &act, NULL)); 1077 VOID_NO_RETRY_EXPECTED(sigaction(signal, &act, NULL));
1076 } 1078 }
1077 } 1079 }
1078 1080
1079 } // namespace bin 1081 } // namespace bin
1080 } // namespace dart 1082 } // namespace dart
1081 1083
1082 #endif // defined(HOST_OS_MACOS) 1084 #endif // defined(HOST_OS_MACOS)
OLDNEW
« no previous file with comments | « runtime/bin/process_linux.cc ('k') | runtime/bin/process_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698