pub fn send(
signal: impl Into<Option<SignalType>>,
pid: impl Into<u32>,
) -> Result<()>
Available on Unix and crate feature
signals
only.Expand description
Sends the specified signal to the specified process. If the specified signal is None
, no signal is sent and only a privilege check is performed instead.
ยงExample
use interprocess::os::unix::signal::{self, SignalType};
use std::process;
// Send a Termination signal to the calling process.
signal::send(SignalType::Termination, process::id())?;