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 처리기를 등록 취소하기 위해 삭제할 수 있는 instance.

특성

예외

handlernull입니다.

signal 는 플랫폼에서 지원되지 않습니다.

신호 처리를 설정하거나 지정된 신호에 대한 처리기를 설치하는 동안 오류가 발생했습니다.

설명

원시 값은 Unix에서 에 대해 signal 로 캐스팅하여 제공할 수 있습니다 PosixSignal. 신호의 기본 처리는 을 통해 Cancel취소할 수 있습니다. SIGINTSIGQUIT 는 Windows 및 Unix 플랫폼에서 SIGTERM 모두 취소할 수 있으며 Unix에서만 취소할 수 있습니다. Unix에서 및 SIGCONT에 대해 터미널 구성을 SIGCHLD 취소할 수 있습니다.

적용 대상