Struct process_guard::ProcessGuard[][src]

pub struct ProcessGuard { /* fields omitted */ }

Protects a process from becoming an orphan or zombie by killing it when the guard is dropped

Methods

impl ProcessGuard
[src]

Create a new child process

unsafe

It is unsafe to put any arbitrary child process into a process guard, mainly because the guard relies on the child not having been waited on beforehand. Otherwise, it cannot be guaranteed that the child process has not exited and its PID been reused, potentially killing an innocent bystander process on Drop.

Retrieves the child process from the process guard

Spawns a command

Equivalent to calling cmd.spawn(), followed by new.

Spawns a command with a grace timeout

Equivalent to calling cmd.spawn(), followed by new.

Trait Implementations

impl Drop for ProcessGuard
[src]

Executes the destructor for this type. Read more

Auto Trait Implementations