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

Unified Diff: runtime/bin/process.dart

Issue 11238057: Change Process.kill to return a boolean instead of throwing an exception when kill fails. (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
« 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 e5a56184b32ddbee02ee13773aa5d8171ef21056..755ff4718aad2db25a2af9fe32b839da9888b493 100644
--- a/runtime/bin/process.dart
+++ b/runtime/bin/process.dart
@@ -87,10 +87,15 @@ class Process {
* flag. On Posix systems, [kill] sends [signal] to the
* process. Depending on the signal giving, it'll have different
* meanings. When the process terminates as a result of calling
- * [kill] [onExit] is called. If the kill operation fails an
- * exception is thrown.
+ * [kill] [onExit] is called.
+ *
+ * Returns [:true:] if the process is successfully killed (the
+ * signal is successfully sent). Returns [:false:] if the process
+ * could not be killed (the signal could not be sent). Usually,
+ * a [:false:] return value from kill means that the process is
+ * already dead.
*/
- abstract void kill([ProcessSignal signal = ProcessSignal.SIGTERM]);
+ abstract bool kill([ProcessSignal signal = ProcessSignal.SIGTERM]);
/**
* Terminates the streams of a process. [close] must be called on a
« 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