pub struct ForegroundProcess { /* private fields */ }
Expand description

A simple wrapper for std::process::Command

spawn behavior

Unix

When invoke spawn, current process will block SIGTSTP, SIGTTOU, SIGTTIN, SIGCHLD

spawned child process will get it’s own process group id, and it’s going to foreground(by making stdin belong’s to child’s process group).

When child is to over, unblock SIGTSTP, SIGTTOU, SIGTTIN, SIGCHLD, foreground process is back to callers’ process. It bahaves something like SignalHandler in ion(https://gitlab.redox-os.org/redox-os/ion/-/tree/master/).

Windows

It does nothing special on windows system, spawn is the same as std::process::Command::spawn

Implementations

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.