Struct ProcessGroupChild

Source
pub struct ProcessGroupChild { /* private fields */ }
Available on Unix and crate feature process-group and crate feature std only.
Expand description

Wrapper for Child which ensures that all processes in the group are reaped.

Implementations§

Source§

impl ProcessGroupChild

Source

pub fn pgid(&self) -> u32

Get the process group ID of this child process.

See: man 'setpgid(2)'

Trait Implementations§

Source§

impl ChildWrapper for ProcessGroupChild

Source§

fn inner(&self) -> &dyn ChildWrapper

Obtain a reference to the wrapped child.
Source§

fn inner_mut(&mut self) -> &mut dyn ChildWrapper

Obtain a mutable reference to the wrapped child.
Source§

fn into_inner(self: Box<Self>) -> Box<dyn ChildWrapper>

Consume the current wrapper and return the wrapped child. Read more
Source§

fn start_kill(&mut self) -> Result<()>

Kill the Child without waiting for it to exit. Read more
Source§

fn wait(&mut self) -> Result<ExitStatus>

Wait for the Child to exit and return its exit status. Read more
Source§

fn try_wait(&mut self) -> Result<Option<ExitStatus>>

Check if the Child has exited without blocking, and if so, return its exit status. Read more
Source§

fn signal(&self, sig: i32) -> Result<()>

Send a signal to the Child. Read more
Source§

fn try_clone(&self) -> Option<Box<dyn ChildWrapper>>

Obtain a clone if possible. Read more
Source§

fn stdin(&mut self) -> &mut Option<ChildStdin>

Obtain the Child’s stdin. Read more
Source§

fn stdout(&mut self) -> &mut Option<ChildStdout>

Obtain the Child’s stdout. Read more
Source§

fn stderr(&mut self) -> &mut Option<ChildStderr>

Obtain the Child’s stderr. Read more
Source§

fn id(&self) -> u32

Obtain the Child’s process ID. Read more
Source§

fn kill(&mut self) -> Result<()>

Kill the Child and wait for it to exit. Read more
Source§

fn wait_with_output(self: Box<Self>) -> Result<Output>
where Self: 'static,

Wait for the Child to exit and return its exit status and outputs. Read more
Source§

impl Debug for ProcessGroupChild

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more