OLD | NEW |
---|---|
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 interface Process factory _Process { | 5 interface Process factory _Process { |
6 /* | 6 /* |
7 * Creates a new process object preparing to run the executable | 7 * Creates a new process object preparing to run the executable |
8 * found at [path] with the specified [arguments]. [arguments] has | 8 * found at [path] with the specified [arguments]. [arguments] has |
9 * to be a const string array, c.f. bug 5314640. | 9 * to be a const string array, c.f. bug 5314640. |
10 */ | 10 */ |
11 Process(String path, List<String> arguments); | 11 Process(String path, List<String> arguments); |
12 | 12 |
13 /* | 13 /* |
14 * Start the process by running the specified executable. An | 14 * Start the process by running the specified executable. An |
15 * exception of type [ProcessException] is thrown if the process | 15 * exception of type [ProcessException] is thrown if the process |
16 * cannot be started. There is a remote possibility of an exception | 16 * cannot be started. There is a remote possibility of an exception |
17 * being thrown even though the child process did actually start. | 17 * being thrown even though the child process did actually start. |
18 */ | 18 */ |
19 void start(); | 19 void start(); |
20 | 20 |
21 /* | 21 /* |
22 * Returns an input stream of the process stdout. | 22 * Returns an input stream of the process stdout. |
23 */ | 23 */ |
24 InputStream get stdoutStream(); | 24 InputStream2 get stdoutStream(); |
rchandia
2011/10/20 15:49:51
Can we rename this to stdout?
Søren Gjesse
2011/10/21 15:17:03
Sounds resonable. I will make a separate cl with t
| |
25 | 25 |
26 /* | 26 /* |
27 * Returns an input stream of the process stderr. | 27 * Returns an input stream of the process stderr. |
28 */ | 28 */ |
29 InputStream get stderrStream(); | 29 InputStream2 get stderrStream(); |
rchandia
2011/10/20 15:49:51
stderr?
Søren Gjesse
2011/10/21 15:17:03
Ditto.
| |
30 | 30 |
31 /* | 31 /* |
32 * Returns an output stream to the process stdin. | 32 * Returns an output stream to the process stdin. |
33 */ | 33 */ |
34 OutputStream get stdinStream(); | 34 OutputStream get stdinStream(); |
35 | 35 |
36 /* | 36 /* |
37 * Sets an exit handler which gets invoked when the process terminates. | 37 * Sets an exit handler which gets invoked when the process terminates. |
38 */ | 38 */ |
39 void setExitHandler(void callback(int exitCode)); | 39 void setExitHandler(void callback(int exitCode)); |
(...skipping 17 matching lines...) Expand all Loading... | |
57 /* | 57 /* |
58 * Contains the system message for the process exception if any. | 58 * Contains the system message for the process exception if any. |
59 */ | 59 */ |
60 final String message; | 60 final String message; |
61 | 61 |
62 /* | 62 /* |
63 * Contains the OS error code for the process exception if any. | 63 * Contains the OS error code for the process exception if any. |
64 */ | 64 */ |
65 final int errorCode; | 65 final int errorCode; |
66 } | 66 } |
OLD | NEW |