pub(crate) struct Reaper {
sigchld: Event,
zombies: Mutex<Vec<Child>>,
pipe: Pipe,
driver_guard: Mutex<()>,
}Expand description
The zombie process reaper.
Fields§
§sigchld: EventAn event delivered every time the SIGCHLD signal occurs.
zombies: Mutex<Vec<Child>>The list of zombie processes.
pipe: PipeThe pipe that delivers signal notifications.
driver_guard: Mutex<()>Locking this mutex indicates that we are polling the SIGCHLD event.
Implementations§
Source§impl Reaper
impl Reaper
Sourcepub(crate) async fn lock(&self) -> AsyncMutexGuard<'_, ()>
pub(crate) async fn lock(&self) -> AsyncMutexGuard<'_, ()>
Lock the driver thread.
Sourcepub(crate) async fn reap(&'static self, _driver_guard: MutexGuard<'_, ()>) -> !
pub(crate) async fn reap(&'static self, _driver_guard: MutexGuard<'_, ()>) -> !
Reap zombie processes forever.
Sourcepub(crate) fn register(&'static self, child: Child) -> Result<ChildGuard>
pub(crate) fn register(&'static self, child: Child) -> Result<ChildGuard>
Register a process with this reaper.
Sourcepub(crate) async fn status(
&'static self,
child: &Mutex<ChildGuard>,
) -> Result<ExitStatus>
pub(crate) async fn status( &'static self, child: &Mutex<ChildGuard>, ) -> Result<ExitStatus>
Wait for an event to occur for a child process.
Sourcepub(crate) fn has_zombies(&'static self) -> bool
pub(crate) fn has_zombies(&'static self) -> bool
Do we have any registered zombie processes?
Auto Trait Implementations§
impl !Freeze for Reaper
impl !RefUnwindSafe for Reaper
impl Send for Reaper
impl Sync for Reaper
impl Unpin for Reaper
impl UnwindSafe for Reaper
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