pub struct SpawnOptions {
pub grouped: bool,
pub session: bool,
pub reset_sigmask: bool,
}Expand description
Options set when constructing or spawning a command.
It’s recommended to use the Default implementation for this struct, and only set the options
you need to change, to proof against new options being added in future.
§Examples
Command {
program: Program::Exec {
prog: "make".into(),
args: vec!["check".into()],
},
options: SpawnOptions {
grouped: true,
..Default::default()
},
};Fields§
§grouped: boolRun the program in a new process group.
This will use either of Unix process groups or Windows Job Objects via the
process-wrap crate.
session: boolRun the program in a new session.
This will use Unix sessions. On Windows, this is not supported. This
implies grouped: true.
reset_sigmask: boolReset the signal mask of the process before we spawn it.
By default, the signal mask of the process is inherited from the parent process. This means that if the parent process has blocked any signals, the child process will also block those signals. This can cause problems if the child process is expecting to receive those signals.
This is only supported on Unix systems.
Trait Implementations§
Source§impl Clone for SpawnOptions
impl Clone for SpawnOptions
Source§fn clone(&self) -> SpawnOptions
fn clone(&self) -> SpawnOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SpawnOptions
impl Debug for SpawnOptions
Source§impl Default for SpawnOptions
impl Default for SpawnOptions
Source§fn default() -> SpawnOptions
fn default() -> SpawnOptions
Source§impl Hash for SpawnOptions
impl Hash for SpawnOptions
Source§impl PartialEq for SpawnOptions
impl PartialEq for SpawnOptions
impl Copy for SpawnOptions
impl Eq for SpawnOptions
impl StructuralPartialEq for SpawnOptions
Auto Trait Implementations§
impl Freeze for SpawnOptions
impl RefUnwindSafe for SpawnOptions
impl Send for SpawnOptions
impl Sync for SpawnOptions
impl Unpin for SpawnOptions
impl UnwindSafe for SpawnOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.