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

Unified Diff: runtime/bin/process.dart

Issue 11343009: Get rid of 'close' on process. It is very easy to use incorrectly and cut off data from your stream… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comment. Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/bin/process_impl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/process.dart
diff --git a/runtime/bin/process.dart b/runtime/bin/process.dart
index 806fe48dcfeeea25d9d1c594eb85dad95bf3283f..9d5206c94f1c2231011cf17801301df7fb473603 100644
--- a/runtime/bin/process.dart
+++ b/runtime/bin/process.dart
@@ -25,6 +25,11 @@ class Process {
*
* An optional [ProcessOptions] object can be passed to specify
* options other than the executable and the arguments.
+ *
+ * Users must read all data coming on the [stdout] and [stderr]
+ * streams of processes started with [:Process.start:]. If the user
+ * does not read all data on the streams the underlying system
+ * resources will not be freed since there is still pending data.
*/
static Future<Process> start(String executable,
List<String> arguments,
@@ -96,17 +101,6 @@ class Process {
* already dead.
*/
abstract bool kill([ProcessSignal signal = ProcessSignal.SIGTERM]);
-
- /**
- * Terminates the streams of a process. [close] must be called on a
- * process to free the system resources associated with it if not all
- * data on the stdout and stderr streams have been read. Usually,
- * close should be called in [onExit], but care must be taken to actually
- * wait on the stderr and stdout streams to close if all data is required.
- * Once a process has been closed it can no longer be killed and [onExit]
- * is detached so the application is not notified of process termination.
- */
- abstract void close();
}
« no previous file with comments | « no previous file | runtime/bin/process_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698