pub struct ProcessSession;Available on Unix and crate feature
process-session and crate feature std only.Expand description
Wrapper which creates a new session and group for the Command.
This wrapper is only available on Unix.
It creates a new session and new process group and sets the Command as its leader.
See setsid(2).
You may find that some programs behave differently or better when running in a session rather than a process group, or vice versa.
This wrapper uses the same child wrapper as ProcessGroup and does
the same setup (plus the session setup); using both together is unnecessary and may misbehave.
Trait Implementations§
Source§impl Clone for ProcessSession
impl Clone for ProcessSession
Source§fn clone(&self) -> ProcessSession
fn clone(&self) -> ProcessSession
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProcessSession
impl Debug for ProcessSession
Source§impl StdCommandWrapper for ProcessSession
impl StdCommandWrapper for ProcessSession
Source§fn pre_spawn(
&mut self,
command: &mut Command,
_core: &StdCommandWrap,
) -> Result<()>
fn pre_spawn( &mut self, command: &mut Command, _core: &StdCommandWrap, ) -> Result<()>
Called before the command is spawned, to mutate it as needed. Read more
Source§fn wrap_child(
&mut self,
inner: Box<dyn StdChildWrapper>,
_core: &StdCommandWrap,
) -> Result<Box<dyn StdChildWrapper>>
fn wrap_child( &mut self, inner: Box<dyn StdChildWrapper>, _core: &StdCommandWrap, ) -> Result<Box<dyn StdChildWrapper>>
Called to wrap a child into this command wrapper’s child wrapper. Read more
Source§fn extend(&mut self, _other: Box<dyn StdCommandWrapper>)
fn extend(&mut self, _other: Box<dyn StdCommandWrapper>)
Called on a first instance if a second of the same type is added. Read more
Source§fn post_spawn(
&mut self,
_child: &mut Child,
_core: &StdCommandWrap,
) -> Result<()>
fn post_spawn( &mut self, _child: &mut Child, _core: &StdCommandWrap, ) -> Result<()>
Called after spawn, but before the child is wrapped. Read more
impl Copy for ProcessSession
Auto Trait Implementations§
impl Freeze for ProcessSession
impl RefUnwindSafe for ProcessSession
impl Send for ProcessSession
impl Sync for ProcessSession
impl Unpin for ProcessSession
impl UnwindSafe for ProcessSession
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
Mutably borrows from an owned value. Read more