pub struct SupervisedChild { /* private fields */ }Expand description
Running child process owned by the supervisor.
Implementations§
Source§impl SupervisedChild
impl SupervisedChild
Sourcepub fn id(&self) -> Option<u32>
pub fn id(&self) -> Option<u32>
Operating-system process id, if the child has started and is still known.
Sourcepub fn take_stdin(&mut self) -> Option<ChildStdin>
pub fn take_stdin(&mut self) -> Option<ChildStdin>
Take the child’s stdin pipe.
Sourcepub fn take_stdout(&mut self) -> Option<ChildStdout>
pub fn take_stdout(&mut self) -> Option<ChildStdout>
Take the child’s stdout pipe.
Sourcepub fn take_stderr(&mut self) -> Option<ChildStderr>
pub fn take_stderr(&mut self) -> Option<ChildStderr>
Take the child’s stderr pipe.
Sourcepub fn try_wait(&mut self) -> Result<Option<ExitStatus>, NodeSupervisorError>
pub fn try_wait(&mut self) -> Result<Option<ExitStatus>, NodeSupervisorError>
Return the child exit status if it has already exited.
Sourcepub async fn wait(&mut self) -> Result<ExitStatus, NodeSupervisorError>
pub async fn wait(&mut self) -> Result<ExitStatus, NodeSupervisorError>
Wait for the child to exit.
Sourcepub async fn kill_and_wait(&mut self) -> Result<ExitStatus, NodeSupervisorError>
pub async fn kill_and_wait(&mut self) -> Result<ExitStatus, NodeSupervisorError>
Force-stop the child process itself and wait for it to exit.
This kills only the direct child; use the process-group shutdown path when the child may have spawned its own descendants.
Sourcepub fn terminate_process_group(&self) -> Result<(), NodeSupervisorError>
pub fn terminate_process_group(&self) -> Result<(), NodeSupervisorError>
Send SIGTERM to the child’s process group.
Sourcepub fn kill_process_group(&self) -> Result<(), NodeSupervisorError>
pub fn kill_process_group(&self) -> Result<(), NodeSupervisorError>
Send SIGKILL to the child’s process group.
Sourcepub fn process_group_exists(&self) -> Result<bool, NodeSupervisorError>
pub fn process_group_exists(&self) -> Result<bool, NodeSupervisorError>
Return true when the child’s process group still has live members.
Trait Implementations§
Source§impl Debug for SupervisedChild
impl Debug for SupervisedChild
Source§impl Drop for SupervisedChild
impl Drop for SupervisedChild
Auto Trait Implementations§
impl !Freeze for SupervisedChild
impl !RefUnwindSafe for SupervisedChild
impl !UnwindSafe for SupervisedChild
impl Send for SupervisedChild
impl Sync for SupervisedChild
impl Unpin for SupervisedChild
impl UnsafeUnpin for SupervisedChild
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