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

Unified Diff: runtime/bin/process.dart

Issue 11091070: Change Process.start to return a future that completes with a (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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
Index: runtime/bin/process.dart
diff --git a/runtime/bin/process.dart b/runtime/bin/process.dart
index ca6c097e9438b5ffa8b62094e8b6076e61f5f205..a8a30d1d16ec0b2ece119fca013ba1c804df3f94 100644
--- a/runtime/bin/process.dart
+++ b/runtime/bin/process.dart
@@ -17,23 +17,19 @@ void exit(int status) {
class Process {
/**
* Starts a process running the [executable] with the specified
- * [arguments]. Returns a [Process] instance that can be used to
- * interact with the process.
+ * [arguments]. Returns a [:Future<Process>:] that completes with a
+ * Process instance when the process has been successfully
+ * started. That [Process] object can be used to interact with the
+ * process. If the process cannot be started the returned [Future]
+ * completes with an exception.
*
* An optional [ProcessOptions] object can be passed to specify
* options other than the executable and the arguments.
- *
- * When the process has been successfully started [onStart] is
- * called on the returned Process object. If the process fails to
- * start [onError] is called on the returned Process object.
- *
- * No data can be written to the process stdin and the process
- * cannot be closed nor killed before [onStart] has been invoked.
*/
- static Process start(String executable,
- List<String> arguments,
- [ProcessOptions options]) {
- return new _Process.start(executable, arguments, options);
+ static Future<Process> start(String executable,
+ List<String> arguments,
+ [ProcessOptions options]) {
+ return _Process.start(executable, arguments, options);
}
/**
@@ -78,12 +74,6 @@ class Process {
abstract OutputStream get stdin;
/**
- * Set the start handler which gets invoked when the process is
- * successfully started.
- */
- abstract void set onStart(void callback());
-
- /**
* Sets an exit handler which gets invoked when the process
* terminates.
*

Powered by Google App Engine
This is Rietveld 408576698