PosixSignalRegistration.Create メソッド

定義

handler 発生したときに呼び出される を signal 登録します。

public:
 static System::Runtime::InteropServices::PosixSignalRegistration ^ Create(System::Runtime::InteropServices::PosixSignal signal, Action<System::Runtime::InteropServices::PosixSignalContext ^> ^ handler);
[System.Runtime.Versioning.UnsupportedOSPlatform("android")]
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
[System.Runtime.Versioning.UnsupportedOSPlatform("ios")]
[System.Runtime.Versioning.UnsupportedOSPlatform("tvos")]
public static System.Runtime.InteropServices.PosixSignalRegistration Create (System.Runtime.InteropServices.PosixSignal signal, Action<System.Runtime.InteropServices.PosixSignalContext> handler);
[<System.Runtime.Versioning.UnsupportedOSPlatform("android")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("ios")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("tvos")>]
static member Create : System.Runtime.InteropServices.PosixSignal * Action<System.Runtime.InteropServices.PosixSignalContext> -> System.Runtime.InteropServices.PosixSignalRegistration
Public Shared Function Create (signal As PosixSignal, handler As Action(Of PosixSignalContext)) As PosixSignalRegistration

パラメーター

signal
PosixSignal

登録するシグナル。

handler
Action<PosixSignalContext>

呼び出されるハンドラー。

戻り値

ハンドラーの PosixSignalRegistration 登録を解除するために破棄できるインスタンス。

属性

例外

handlernull です。

signal はプラットフォームではサポートされていません。

シグナル処理の設定中、または指定されたシグナルのハンドラーのインストール中にエラーが発生しました。

注釈

Unix では、生の値を signal にキャストすることで、 に対して値を PosixSignal指定できます。 シグナルの既定の処理は、 を介して Cancel取り消すことができます。 SIGINT および SIGQUIT は、Windows と Unix プラットフォーム SIGTERM の両方で取り消すことができます。取り消すことができるのは Unix のみです。 Unix では、 および SIGCONTのターミナル構成をSIGCHLD取り消すことができます。

適用対象