pub struct OwnedContainerCleanup { /* private fields */ }Expand description
Retains the atomically acquired child identity and exclusive wait obligation.
No other thread/handler may reap this child or close its private pidfd. Explicit waits are bounded; Drop cancels and waits and can block indefinitely on an uninterruptible child or persistent inability to observe its exit. Such failures require outer process supervision, never a detached reaper.
Implementations§
Source§impl OwnedContainerCleanup
impl OwnedContainerCleanup
Sourcepub fn child_pid(&self) -> Pid
pub fn child_pid(&self) -> Pid
The original PID, for diagnostics only; do not signal or reap it separately.
Sourcepub fn observation(&self) -> ChildCleanupObservation
pub fn observation(&self) -> ChildCleanupObservation
The last actual observation; a timeout does not fabricate a wait status.
Sourcepub fn last_error(&self) -> Option<Errno>
pub fn last_error(&self) -> Option<Errno>
The most recent cleanup error, retained even after later physical exit.
Sourcepub fn wait_until(&mut self, deadline: Instant) -> ChildCleanupObservation
pub fn wait_until(&mut self, deadline: Instant) -> ChildCleanupObservation
Observes the actual child until the absolute deadline, retaining ownership.
Sourcepub fn cancel_and_wait_until(
&mut self,
deadline: Instant,
) -> ChildCleanupObservation
pub fn cancel_and_wait_until( &mut self, deadline: Instant, ) -> ChildCleanupObservation
Sends cancellation through the held pidfd, then observes until the deadline. ESRCH alone is not evidence of termination. Errors retain this owner.