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

Unified Diff: runtime/bin/process.cc

Issue 119093007: Signal handling, take 2. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years 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.h ('k') | runtime/bin/process_android.cc » ('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 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);
« no previous file with comments | « runtime/bin/process.h ('k') | runtime/bin/process_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698