[corlib] Add API to uninstall/reinstall signal handlers.
authorRolf Bjarne Kvinge <rolf@xamarin.com>
Fri, 23 Sep 2016 11:53:36 +0000 (13:53 +0200)
committerRolf Bjarne Kvinge <rolf@xamarin.com>
Tue, 27 Sep 2016 10:35:14 +0000 (12:35 +0200)
This API is provided to be used by libraries providing crash reporting, so
that those libraries can install signal handlers and at the same time not
interfere with Mono's signals.

The intended pattern is this:

    Mono.Runtime.RemoveSignalHandlers ();
    InstallThirdPartySignalHandlers ();
    Mono.Runtime.InstallSignalHandlers ();

This ensures that Mono is always notified first of any signals, and will then
chain to the third-party signal handlers if the signal did not originate in
managed code.

Mono's signals must first be removed, so that if third-party signal handler
does signal chaining, we don't end up in Mono's signal handler again.

Mailing-list thread: http://lists.dot.net/pipermail/macios-devel/2016-September/000016.html [Signal-chaining & crash reporters]
Example usage: https://github.com/rolfbjarne/HockeySDK-Xamarin/commit/862721199f1adec210bfc7b1943f975ffb8048a9


No differences found