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 CommandWrapper for ProcessSession
impl CommandWrapper for ProcessSession
Source§fn pre_spawn(
&mut self,
command: &mut Command,
_core: &CommandWrap,
) -> Result<()>
fn pre_spawn( &mut self, command: &mut Command, _core: &CommandWrap, ) -> Result<()>
Called before the command is spawned, to mutate it as needed. Read more
Source§fn wrap_child(
&mut self,
inner: Box<dyn ChildWrapper>,
_core: &CommandWrap,
) -> Result<Box<dyn ChildWrapper>>
fn wrap_child( &mut self, inner: Box<dyn ChildWrapper>, _core: &CommandWrap, ) -> Result<Box<dyn ChildWrapper>>
Called to wrap a child into this command wrapper’s child wrapper. Read more
Source§fn extend(&mut self, _other: Box<dyn CommandWrapper>)
fn extend(&mut self, _other: Box<dyn CommandWrapper>)
Called on a first instance if a second of the same type is added. Read more
Source§fn post_spawn(
&mut self,
_command: &mut Command,
_child: &mut Child,
_core: &CommandWrap,
) -> Result<()>
fn post_spawn( &mut self, _command: &mut Command, _child: &mut Child, _core: &CommandWrap, ) -> Result<()>
Called after spawn, but before the child is wrapped. Read more
Source§impl Debug for ProcessSession
impl Debug for ProcessSession
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