Process.Signal(PosixSignal) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sends a signal to the associated process.
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
Parameters
- signal
- PosixSignal
The signal to send.
Returns
true if the signal was sent successfully; false if the process has already exited or no longer exists and the signal was not delivered.
- Attributes
Exceptions
There is no process associated with this object, or the process handle is invalid.
The process object has been disposed.
The process is on a remote computer.
The current platform or the specified signal is not supported.
The signal could not be sent.
Remarks
On Windows, only SIGKILL is supported, and sending it terminates the process. The process handle must have PROCESS_TERMINATE access.