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 #ifndef RUNTIME_BIN_PROCESS_H_ | 5 #ifndef RUNTIME_BIN_PROCESS_H_ |
6 #define RUNTIME_BIN_PROCESS_H_ | 6 #define RUNTIME_BIN_PROCESS_H_ |
7 | 7 |
8 #include <errno.h> | 8 #include <errno.h> |
9 | 9 |
10 #include "bin/builtin.h" | 10 #include "bin/builtin.h" |
11 #include "bin/io_buffer.h" | 11 #include "bin/io_buffer.h" |
12 #include "bin/lockers.h" | 12 #include "bin/lockers.h" |
| 13 #include "bin/namespace.h" |
13 #include "bin/thread.h" | 14 #include "bin/thread.h" |
14 #include "platform/globals.h" | 15 #include "platform/globals.h" |
15 #if !defined(HOST_OS_WINDOWS) | 16 #if !defined(HOST_OS_WINDOWS) |
16 #include "platform/signal_blocker.h" | 17 #include "platform/signal_blocker.h" |
17 #endif | 18 #endif |
18 #include "platform/utils.h" | 19 #include "platform/utils.h" |
19 | 20 |
20 namespace dart { | 21 namespace dart { |
21 namespace bin { | 22 namespace bin { |
22 | 23 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 enum ProcessStartMode { | 81 enum ProcessStartMode { |
81 kNormal = 0, | 82 kNormal = 0, |
82 kDetached = 1, | 83 kDetached = 1, |
83 kDetachedWithStdio = 2, | 84 kDetachedWithStdio = 2, |
84 }; | 85 }; |
85 | 86 |
86 class Process { | 87 class Process { |
87 public: | 88 public: |
88 // Start a new process providing access to stdin, stdout, stderr and | 89 // Start a new process providing access to stdin, stdout, stderr and |
89 // process exit streams. | 90 // process exit streams. |
90 static int Start(const char* path, | 91 static int Start(Namespace* namespc, |
| 92 const char* path, |
91 char* arguments[], | 93 char* arguments[], |
92 intptr_t arguments_length, | 94 intptr_t arguments_length, |
93 const char* working_directory, | 95 const char* working_directory, |
94 char* environment[], | 96 char* environment[], |
95 intptr_t environment_length, | 97 intptr_t environment_length, |
96 ProcessStartMode mode, | 98 ProcessStartMode mode, |
97 intptr_t* in, | 99 intptr_t* in, |
98 intptr_t* out, | 100 intptr_t* out, |
99 intptr_t* err, | 101 intptr_t* err, |
100 intptr_t* id, | 102 intptr_t* id, |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 | 366 |
365 private: | 367 private: |
366 DISALLOW_COPY_AND_ASSIGN(BufferList); | 368 DISALLOW_COPY_AND_ASSIGN(BufferList); |
367 }; | 369 }; |
368 #endif // defined(HOST_OS_ANDROID) ... | 370 #endif // defined(HOST_OS_ANDROID) ... |
369 | 371 |
370 } // namespace bin | 372 } // namespace bin |
371 } // namespace dart | 373 } // namespace dart |
372 | 374 |
373 #endif // RUNTIME_BIN_PROCESS_H_ | 375 #endif // RUNTIME_BIN_PROCESS_H_ |
OLD | NEW |