Process.Signal(PosixSignal) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
向相關程序發送訊號。
public:
bool Signal(System::Runtime::InteropServices::PosixSignal signal);
[System.Runtime.Versioning.SupportedOSPlatform("maccatalyst")]
[System.Runtime.Versioning.UnsupportedOSPlatform("ios")]
[System.Runtime.Versioning.UnsupportedOSPlatform("tvos")]
public bool Signal(System.Runtime.InteropServices.PosixSignal signal);
[<System.Runtime.Versioning.SupportedOSPlatform("maccatalyst")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("ios")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("tvos")>]
member this.Signal : System.Runtime.InteropServices.PosixSignal -> bool
Public Function Signal (signal As PosixSignal) As Boolean
參數
- signal
- PosixSignal
發送信號。
傳回
true 若訊號成功傳送; false 如果程序已經退出或不再存在,且訊號未被傳送。
- 屬性
例外狀況
此物件沒有相關程序,或程序代柄無效。
程序物件已被處置。
這個過程是在遠端電腦上進行的。
目前的月台或指定訊號不支援。
訊號無法傳送。
備註
在 Windows 上,只有SIGKILL支援,傳送它會終止程序。 程序 handle 必須有存取 PROCESS_TERMINATE 權限。