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

Unified Diff: runtime/bin/process.cc

Issue 895623002: Add support for killing a process with a given PID to dart:io (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments Created 5 years, 11 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/io_natives.cc ('k') | runtime/bin/process_patch.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/process.cc
diff --git a/runtime/bin/process.cc b/runtime/bin/process.cc
index 0f3e5bc0881d06ccb3eb46f0d11a242070b09c24..40affe1b008d5bf1b34721a45536f75a6ec6331c 100644
--- a/runtime/bin/process.cc
+++ b/runtime/bin/process.cc
@@ -201,11 +201,9 @@ void FUNCTION_NAME(Process_Wait)(Dart_NativeArguments args) {
}
-void FUNCTION_NAME(Process_Kill)(Dart_NativeArguments args) {
- Dart_Handle process = Dart_GetNativeArgument(args, 1);
- intptr_t pid = -1;
- Process::GetProcessIdNativeField(process, &pid);
- intptr_t signal = DartUtils::GetIntptrValue(Dart_GetNativeArgument(args, 2));
+void FUNCTION_NAME(Process_KillPid)(Dart_NativeArguments args) {
+ intptr_t pid = DartUtils::GetIntptrValue(Dart_GetNativeArgument(args, 0));
+ intptr_t signal = DartUtils::GetIntptrValue(Dart_GetNativeArgument(args, 1));
bool success = Process::Kill(pid, signal);
Dart_SetReturnValue(args, Dart_NewBoolean(success));
}
« no previous file with comments | « runtime/bin/io_natives.cc ('k') | runtime/bin/process_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698