pub struct UnixPtyChild { /* private fields */ }Expand description
Unix child process handle.
This struct manages a child process spawned in a PTY, providing methods for monitoring its state and sending signals.
Implementations§
Source§impl UnixPtyChild
impl UnixPtyChild
Sourcepub fn new(child: TokioChild) -> Self
pub fn new(child: TokioChild) -> Self
Create a new child process handle.
Sourcepub fn from_pid(pid: u32) -> Self
pub fn from_pid(pid: u32) -> Self
Create a child handle from just a PID (for fork-based spawning).
Sourcepub fn is_running(&self) -> bool
pub fn is_running(&self) -> bool
Check if the process is still running.
Sourcepub async fn wait(&mut self) -> Result<ExitStatus>
pub async fn wait(&mut self) -> Result<ExitStatus>
Wait for the child process to exit.
Sourcepub fn try_wait(&mut self) -> Result<Option<ExitStatus>>
pub fn try_wait(&mut self) -> Result<Option<ExitStatus>>
Try to get the exit status without blocking.
Trait Implementations§
Source§impl Debug for UnixPtyChild
impl Debug for UnixPtyChild
Source§impl PtyChild for UnixPtyChild
impl PtyChild for UnixPtyChild
Source§fn is_running(&self) -> bool
fn is_running(&self) -> bool
Check if the child process is still running.
Source§fn wait(
&mut self,
) -> Pin<Box<dyn Future<Output = Result<ExitStatus>> + Send + '_>>
fn wait( &mut self, ) -> Pin<Box<dyn Future<Output = Result<ExitStatus>> + Send + '_>>
Wait for the child process to exit. Read more
Auto Trait Implementations§
impl Freeze for UnixPtyChild
impl !RefUnwindSafe for UnixPtyChild
impl Send for UnixPtyChild
impl Sync for UnixPtyChild
impl Unpin for UnixPtyChild
impl !UnwindSafe for UnixPtyChild
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