pub struct ProcessTree { /* private fields */ }Expand description
One child and descendants that remain in its operating-system containment.
Windows uses a Job object. Unix uses a process group, which cannot contain a descendant that deliberately creates a new process group or session.
Implementations§
Source§impl ProcessTree
impl ProcessTree
Sourcepub fn try_wait(&mut self) -> Result<Option<ExitStatus>>
pub fn try_wait(&mut self) -> Result<Option<ExitStatus>>
Polls the direct child without releasing ownership of its descendants.
Sourcepub fn wait(&mut self) -> Result<ExitStatus>
pub fn wait(&mut self) -> Result<ExitStatus>
Waits for the direct child while retaining ownership of its descendants.
Sourcepub fn wait_with_output(&mut self) -> Result<Output>
pub fn wait_with_output(&mut self) -> Result<Output>
Collects the direct child’s output while retaining the descendant guard.
Sourcepub fn terminate(&mut self) -> Result<()>
pub fn terminate(&mut self) -> Result<()>
Terminates every process in the tree and reaps the direct child.
Sourcepub fn terminate_descendants(&mut self) -> Result<()>
pub fn terminate_descendants(&mut self) -> Result<()>
Signals termination to the entire tree while retaining the direct child so its captured output can still be collected.
Trait Implementations§
Source§impl Drop for ProcessTree
impl Drop for ProcessTree
Auto Trait Implementations§
impl Freeze for ProcessTree
impl RefUnwindSafe for ProcessTree
impl Send for ProcessTree
impl Sync for ProcessTree
impl Unpin for ProcessTree
impl UnsafeUnpin for ProcessTree
impl UnwindSafe for ProcessTree
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