Last active
September 23, 2016 12:09
-
-
Save rolfbjarne/0e3cc1a7808224a0fb3ae4f96a258e93 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commit 862721199f1adec210bfc7b1943f975ffb8048a9 | |
Author: Rolf Bjarne Kvinge <rolf@xamarin.com> | |
Date: Fri Sep 23 14:03:55 2016 +0200 | |
Use Mono's support for uninstalling/reinstalling signal handlers. | |
diff --git a/source/HockeySDK.iOSBindings/Additions.cs b/source/HockeySDK.iOSBindings/Additions.cs | |
index 7e7a17d..0c2cdcb 100644 | |
--- a/source/HockeySDK.iOSBindings/Additions.cs | |
+++ b/source/HockeySDK.iOSBindings/Additions.cs | |
@@ -29,26 +29,16 @@ namespace HockeyApp.iOS | |
{ | |
if (startedManager) return; | |
- IntPtr sigbus = Marshal.AllocHGlobal(512); | |
- IntPtr sigsegv = Marshal.AllocHGlobal(512); | |
- | |
- // Store Mono SIGSEGV and SIGBUS handlers | |
- sigaction(Signal.SIGBUS, IntPtr.Zero, sigbus); | |
- sigaction(Signal.SIGSEGV, IntPtr.Zero, sigsegv); | |
+ Mono.Runtime.RemoveSignalHandlers (); | |
// Enable crash reporting libraries | |
DoStartManager(); | |
+ Mono.Runtime.InstallSignalHandlers (); | |
+ | |
AppDomain.CurrentDomain.UnhandledException += (sender, e) => ThrowExceptionAsNative(e.ExceptionObject); | |
TaskScheduler.UnobservedTaskException += (sender, e) => ThrowExceptionAsNative(e.Exception); | |
- // Restore Mono SIGSEGV and SIGBUS handlers | |
- sigaction(Signal.SIGBUS, sigbus, IntPtr.Zero); | |
- sigaction(Signal.SIGSEGV, sigsegv, IntPtr.Zero); | |
- | |
- Marshal.FreeHGlobal(sigbus); | |
- Marshal.FreeHGlobal(sigsegv); | |
- | |
startedManager = true; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment