Index: runtime/bin/process.cc |
diff --git a/runtime/bin/process.cc b/runtime/bin/process.cc |
index 3c34a47517510aab6b9af38b3b15ede33c8fb3fe..ebafedd28bf3e906e28990ff70e97f5d20abf31b 100644 |
--- a/runtime/bin/process.cc |
+++ b/runtime/bin/process.cc |
@@ -243,6 +243,23 @@ void FUNCTION_NAME(Process_Pid)(Dart_NativeArguments args) { |
} |
+void FUNCTION_NAME(Process_SetSignalHandler)(Dart_NativeArguments args) { |
+ intptr_t signal = DartUtils::GetIntptrValue(Dart_GetNativeArgument(args, 0)); |
+ intptr_t id = Process::SetSignalHandler(signal); |
+ if (id == -1) { |
+ Dart_SetReturnValue(args, DartUtils::NewDartOSError()); |
+ } else { |
+ Dart_SetReturnValue(args, Dart_NewInteger(id)); |
+ } |
+} |
+ |
+ |
+void FUNCTION_NAME(Process_ClearSignalHandler)(Dart_NativeArguments args) { |
+ intptr_t signal = DartUtils::GetIntptrValue(Dart_GetNativeArgument(args, 0)); |
+ Process::ClearSignalHandler(signal); |
+} |
+ |
+ |
Dart_Handle Process::GetProcessIdNativeField(Dart_Handle process, |
intptr_t* pid) { |
return Dart_GetNativeInstanceField(process, kProcessIdNativeField, pid); |