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

Side by Side Diff: runtime/bin/process.dart

Issue 10386140: Update documentation on Process.close to explain issues with closing before reading out all content… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 /** 5 /**
6 * [Process] is used to start new processes using the static 6 * [Process] is used to start new processes using the static
7 * [start] and [run] methods. 7 * [start] and [run] methods.
8 */ 8 */
9 class Process { 9 class Process {
10 /** 10 /**
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 abstract void set onError(void callback(e)); 91 abstract void set onError(void callback(e));
92 92
93 /** 93 /**
94 * Kills the process. When the process terminates as a result of 94 * Kills the process. When the process terminates as a result of
95 * calling [kill] [onExit] is called. If the kill operation fails, 95 * calling [kill] [onExit] is called. If the kill operation fails,
96 * [onError] is called. 96 * [onError] is called.
97 */ 97 */
98 abstract void kill(); 98 abstract void kill();
99 99
100 /** 100 /**
101 * Terminates the streams of a process. [close] most be called on a 101 * Terminates the streams of a process. [close] must be called on a
102 * process to free the system resources associated with it. Usually, 102 * process to free the system resources associated with it if not all
103 * close should be called in [onExit]. Once a process has been 103 * data on the stdout and stderr streams have been read. Usually,
104 * closed it can no longer be killed and [onExit] is detached so the 104 * close should be called in [onExit], but care must be taken to actually
105 * application is not notified of process termination. 105 * wait on the stderr and stdout streams to close if all data is required.
106 * Once a process has been closed it can no longer be killed and [onExit]
107 * is detached so the application is not notified of process termination.
106 */ 108 */
107 abstract void close(); 109 abstract void close();
108 } 110 }
109 111
110 112
111 /** 113 /**
112 * [ProcessResult] represents the result of running a non-interactive 114 * [ProcessResult] represents the result of running a non-interactive
113 * process started with [:Process.run:]. 115 * process started with [:Process.run:].
114 */ 116 */
115 interface ProcessResult { 117 interface ProcessResult {
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 /** 186 /**
185 * Contains the system message for the process exception if any. 187 * Contains the system message for the process exception if any.
186 */ 188 */
187 final String message; 189 final String message;
188 190
189 /** 191 /**
190 * Contains the OS error code for the process exception if any. 192 * Contains the OS error code for the process exception if any.
191 */ 193 */
192 final int errorCode; 194 final int errorCode;
193 } 195 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698