Skip to main content

Process

Trait Process 

Source
pub trait Process {
    // Required methods
    fn wait(&mut self) -> impl Future<Output = Result<Termination>> + Send;
    fn signal(&mut self, signal: Signal) -> Result<()>;
    fn group_alive(&self) -> bool;

    // Provided method
    fn ended(&self) -> Ended { ... }
}
Expand description

A running task process.

Required Methods§

Source

fn wait(&mut self) -> impl Future<Output = Result<Termination>> + Send

Waits until the process ends.

Source

fn signal(&mut self, signal: Signal) -> Result<()>

Sends a signal to the process’s whole group; a group that is already gone is fine.

§Errors

Returns the operating system’s error for anything but a group that is gone.

Source

fn group_alive(&self) -> bool

Whether anything of its group still runs, after its leader ended (no default: a wrapper that forgot to forward it would leave a stopped task’s children behind).

Provided Methods§

Source

fn ended(&self) -> Ended

What it used and whether it dumped core, once Process::wait returned; nothing known by default.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§