Struct nu_system::ForegroundProcess
source · [−]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
impl !RefUnwindSafe for ForegroundProcess
impl Send for ForegroundProcess
impl Sync for ForegroundProcess
impl Unpin for ForegroundProcess
impl !UnwindSafe for ForegroundProcess
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more