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 BIN_PROCESS_H_ | 5 #ifndef BIN_PROCESS_H_ |
6 #define BIN_PROCESS_H_ | 6 #define BIN_PROCESS_H_ |
7 | 7 |
8 #include "bin/builtin.h" | 8 #include "bin/builtin.h" |
9 #include "bin/io_buffer.h" | 9 #include "bin/io_buffer.h" |
10 #include "bin/lockers.h" | 10 #include "bin/lockers.h" |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 kSigxcpu = 24, | 70 kSigxcpu = 24, |
71 kSigxfsz = 25, | 71 kSigxfsz = 25, |
72 kSigvtalrm = 26, | 72 kSigvtalrm = 26, |
73 kSigprof = 27, | 73 kSigprof = 27, |
74 kSigwinch = 28, | 74 kSigwinch = 28, |
75 kSigpoll = 29, | 75 kSigpoll = 29, |
76 kSigsys = 31 | 76 kSigsys = 31 |
77 }; | 77 }; |
78 | 78 |
79 | 79 |
| 80 // To be kept in sync with ProcessStartMode consts in sdk/lib/io/process.dart. |
| 81 enum ProcessStartMode { |
| 82 kNormal = 0, |
| 83 kDetached = 1, |
| 84 kDetachedWithStdio = 2, |
| 85 }; |
| 86 |
| 87 |
80 class Process { | 88 class Process { |
81 public: | 89 public: |
82 // Start a new process providing access to stdin, stdout, stderr and | 90 // Start a new process providing access to stdin, stdout, stderr and |
83 // process exit streams. | 91 // process exit streams. |
84 static int Start(const char* path, | 92 static int Start(const char* path, |
85 char* arguments[], | 93 char* arguments[], |
86 intptr_t arguments_length, | 94 intptr_t arguments_length, |
87 const char* working_directory, | 95 const char* working_directory, |
88 char* environment[], | 96 char* environment[], |
89 intptr_t environment_length, | 97 intptr_t environment_length, |
90 bool detached, | 98 ProcessStartMode mode, |
91 intptr_t* in, | 99 intptr_t* in, |
92 intptr_t* out, | 100 intptr_t* out, |
93 intptr_t* err, | 101 intptr_t* err, |
94 intptr_t* id, | 102 intptr_t* id, |
95 intptr_t* exit_handler, | 103 intptr_t* exit_handler, |
96 char** os_error_message); | 104 char** os_error_message); |
97 | 105 |
98 static bool Wait(intptr_t id, | 106 static bool Wait(intptr_t id, |
99 intptr_t in, | 107 intptr_t in, |
100 intptr_t out, | 108 intptr_t out, |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 intptr_t data_size_; | 284 intptr_t data_size_; |
277 | 285 |
278 // Number of free bytes in the last node in the list. | 286 // Number of free bytes in the last node in the list. |
279 intptr_t free_size_; | 287 intptr_t free_size_; |
280 }; | 288 }; |
281 | 289 |
282 } // namespace bin | 290 } // namespace bin |
283 } // namespace dart | 291 } // namespace dart |
284 | 292 |
285 #endif // BIN_PROCESS_H_ | 293 #endif // BIN_PROCESS_H_ |
OLD | NEW |