#[allow(unused_imports)]
use anyhow::Context;
#[cfg(feature = "linux_pidfd")]
#[cfg(target_os = "linux")]
pub trait ChildExtContext: std :: os :: linux :: process :: ChildExt {
fn pidfd_wc ( & self ) -> crate :: rewrite_output_type ! ( std :: io :: Result < & std :: os :: linux :: process :: PidFd > ) {
< Self as :: std :: os :: linux :: process :: ChildExt > :: pidfd(self)
.with_context(|| crate::call_failed!(Some(self), "pidfd"))
}
}
#[cfg(feature = "linux_pidfd")]
#[cfg(target_os = "linux")]
impl<T> ChildExtContext for T where T: std :: os :: linux :: process :: ChildExt {}
#[cfg(feature = "linux_pidfd")]
#[cfg(target_os = "linux")]
pub trait PidFdContext {
fn try_wait_wc ( & self ) -> crate :: rewrite_output_type ! ( std :: io :: Result < core :: option :: Option < std :: process :: ExitStatus > > );
fn kill_wc ( & self ) -> crate :: rewrite_output_type ! ( std :: io :: Result < ( ) > );
fn wait_wc ( & self ) -> crate :: rewrite_output_type ! ( std :: io :: Result < std :: process :: ExitStatus > );
}
#[cfg(feature = "linux_pidfd")]
#[cfg(target_os = "linux")]
impl PidFdContext for std :: os :: linux :: process :: PidFd {
fn try_wait_wc ( & self ) -> crate :: rewrite_output_type ! ( std :: io :: Result < core :: option :: Option < std :: process :: ExitStatus > > ) {
std :: os :: linux :: process :: PidFd :: try_wait(self)
.with_context(|| crate::call_failed!(Some(self), "try_wait"))
}
fn kill_wc ( & self ) -> crate :: rewrite_output_type ! ( std :: io :: Result < ( ) > ) {
std :: os :: linux :: process :: PidFd :: kill(self)
.with_context(|| crate::call_failed!(Some(self), "kill"))
}
fn wait_wc ( & self ) -> crate :: rewrite_output_type ! ( std :: io :: Result < std :: process :: ExitStatus > ) {
std :: os :: linux :: process :: PidFd :: wait(self)
.with_context(|| crate::call_failed!(Some(self), "wait"))
}
}