| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "bin/dartutils.h" | 5 #include "bin/dartutils.h" |
| 6 #include "bin/process.h" | 6 #include "bin/process.h" |
| 7 | 7 |
| 8 #include "include/dart_api.h" | 8 #include "include/dart_api.h" |
| 9 | 9 |
| 10 // Extract an array of C strings from a list of Dart strings. | 10 // Extract an array of C strings from a list of Dart strings. |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 delete[] string_args; | 140 delete[] string_args; |
| 141 delete[] string_environment; | 141 delete[] string_environment; |
| 142 Dart_SetReturnValue(args, Dart_NewBoolean(error_code == 0)); | 142 Dart_SetReturnValue(args, Dart_NewBoolean(error_code == 0)); |
| 143 Dart_ExitScope(); | 143 Dart_ExitScope(); |
| 144 } | 144 } |
| 145 | 145 |
| 146 | 146 |
| 147 void FUNCTION_NAME(Process_Kill)(Dart_NativeArguments args) { | 147 void FUNCTION_NAME(Process_Kill)(Dart_NativeArguments args) { |
| 148 Dart_EnterScope(); | 148 Dart_EnterScope(); |
| 149 intptr_t pid = DartUtils::GetIntegerValue(Dart_GetNativeArgument(args, 1)); | 149 intptr_t pid = DartUtils::GetIntegerValue(Dart_GetNativeArgument(args, 1)); |
| 150 bool success = Process::Kill(pid); | 150 int signal = DartUtils::GetIntegerValue(Dart_GetNativeArgument(args, 2)); |
| 151 bool success = Process::Kill(pid, signal); |
| 151 Dart_SetReturnValue(args, Dart_NewBoolean(success)); | 152 Dart_SetReturnValue(args, Dart_NewBoolean(success)); |
| 152 Dart_ExitScope(); | 153 Dart_ExitScope(); |
| 153 } | 154 } |
| OLD | NEW |