pub struct KillOnExit(/* private fields */);Expand description
Holds a child registered with kill_registered_children; dropping it kills, reaps and unregisters the child.
Implementations§
Source§impl KillOnExit
impl KillOnExit
Sourcepub fn finish(self, grace: Duration) -> Option<ExitStatus>
pub fn finish(self, grace: Duration) -> Option<ExitStatus>
Ends the child and says how it ended: its own exit status when it exits within grace (a child whose pipe
closed is ending), None when it is still running then (the guard’s drop kills it) or is already gone.
Trait Implementations§
Source§impl Drop for KillOnExit
impl Drop for KillOnExit
Auto Trait Implementations§
impl Freeze for KillOnExit
impl RefUnwindSafe for KillOnExit
impl Send for KillOnExit
impl Sync for KillOnExit
impl Unpin for KillOnExit
impl UnsafeUnpin for KillOnExit
impl UnwindSafe for KillOnExit
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