pub struct OwnedChild { /* private fields */ }Implementations§
Source§impl OwnedChild
impl OwnedChild
pub fn id(&self) -> u32
Sourcepub fn child(&self) -> MutexGuard<'_, Child>
pub fn child(&self) -> MutexGuard<'_, Child>
Borrow child state, including stdio, wait and try_wait. Windows uses a native view with std pipe types for both spawn paths. Release this guard before another accessor or exit reader; it holds the shared reap lock.
pub fn take_stdin(&mut self) -> Option<ChildStdin>
pub fn take_stdout(&mut self) -> Option<ChildStdout>
pub fn take_stderr(&mut self) -> Option<ChildStderr>
pub fn job_assignment_failures(&self) -> &[JobAssignmentFailure]
pub fn process_handle(&self) -> Result<ProcessHandle>
pub fn creation_time(&self) -> Option<SystemTime>
pub fn try_wait(&mut self) -> Result<Option<ExitStatus>>
pub fn wait(&mut self) -> Result<ExitStatus>
pub fn wait_timeout(&mut self, timeout: Duration) -> Result<Option<ExitStatus>>
pub fn wait_or_kill(&mut self, grace: Duration) -> Result<WaitOutcome>
Sourcepub fn terminate_tree(&mut self) -> Result<ExitStatus>
pub fn terminate_tree(&mut self) -> Result<ExitStatus>
Immediate forced termination, preserving the existing default. Retained group/job is signalled even after the parent was reaped.
Sourcepub fn terminate_tree_with_options(
&mut self,
options: TerminationOptions,
) -> Result<ExitStatus>
pub fn terminate_tree_with_options( &mut self, options: TerminationOptions, ) -> Result<ExitStatus>
Unix: TERM now, tree-wide grace, then KILL even if parent exited. Windows: immediately terminate retained job with supplied exit code.
pub fn terminate_tree_bounded( &mut self, timeout: Duration, ) -> Result<ReapOutcome>
Sourcepub fn terminate_tree_bounded_with_options(
&mut self,
timeout: Duration,
options: TerminationOptions,
) -> Result<ReapOutcome>
pub fn terminate_tree_bounded_with_options( &mut self, timeout: Duration, options: TerminationOptions, ) -> Result<ReapOutcome>
timeout covers grace plus reap; grace is clipped to timeout.
Trait Implementations§
Source§impl Debug for OwnedChild
impl Debug for OwnedChild
Source§impl Drop for OwnedChild
impl Drop for OwnedChild
Auto Trait Implementations§
impl !RefUnwindSafe for OwnedChild
impl !UnwindSafe for OwnedChild
impl Freeze for OwnedChild
impl Send for OwnedChild
impl Sync for OwnedChild
impl Unpin for OwnedChild
impl UnsafeUnpin for OwnedChild
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