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
要发送的信号。
返回
- 属性
例外
没有与此对象关联的进程,或者进程句柄无效。
进程对象已被释放。
此过程位于远程计算机上。
当前平台或指定的信号不受支持。
无法发送信号。
注解
在Windows上,仅SIGKILL受支持,并发送它将终止进程。 进程句柄必须具有 PROCESS_TERMINATE 访问权限。