pub fn kill<T: Into<Option<Signal>>>(pid: Pid, signal: T) -> Result<()>
Expand description
Send a signal to a process
Arguments
pid
- Specifies which processes should receive the signal.- If positive, specifies an individual process.
- If zero, the signal will be sent to all processes whose group
ID is equal to the process group ID of the sender. This is a
variant of
killpg
. - If
-1
and the process has super-user privileges, the signal is sent to all processes exclusing system processes. - If less than
-1
, the signal is sent to all processes whose process group ID is equal to the absolute value ofpid
.
signal
- Signal to send. IfNone
, error checking is performed but no signal is actually sent.
See Also
kill(2)