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

Unified Diff: runtime/bin/process_win.cc

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 | « runtime/bin/process_macos.cc ('k') | tests/standalone/io/process_kill_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/process_win.cc
diff --git a/runtime/bin/process_win.cc b/runtime/bin/process_win.cc
index 104fee3e9eaa1d650717495754e1f98a40ed6421..5628a53998d36f624c6cffed0f21fde75e2cd0e0 100644
--- a/runtime/bin/process_win.cc
+++ b/runtime/bin/process_win.cc
@@ -511,9 +511,8 @@ bool Process::Kill(intptr_t id, int signal) {
&process_handle,
&wait_handle,
&exit_pipe);
- if (!success) {
- return true; // The process has already died. Report a successful kill.
- }
+ // The process is already dead.
+ if (!success) return false;
BOOL result = TerminateProcess(process_handle, -1);
return result ? true : false;
}
« no previous file with comments | « runtime/bin/process_macos.cc ('k') | tests/standalone/io/process_kill_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698