pub trait ProcessExt {
// Required methods
fn send_signal(&self, signal: i32) -> Result<()>;
fn send_signal_group(&self, signal: i32) -> Result<()>;
}Expand description
Unix-specific extension methods for Process.
Required Methods§
Sourcefn send_signal(&self, signal: i32) -> Result<()>
fn send_signal(&self, signal: i32) -> Result<()>
Sourcefn send_signal_group(&self, signal: i32) -> Result<()>
fn send_signal_group(&self, signal: i32) -> Result<()>
Send the specified signal to the child’s process group.
This is useful for terminating a tree of processes spawned by the
child. For this to work correctly, the child should be started with
ExecExt::setpgid set, which places the child in a new process group
with PGID equal to its PID.
If the child process is known to have finished, this will do nothing and
return Ok.