Trait ChildExt
trait ChildExt: Sealed
Os-specific extensions for Child
Required Methods
fn pidfd(self: &Self) -> Result<&PidFd>Obtains a reference to the
PidFdcreated for thisChild, if available.A pidfd will only be available if its creation was requested with
create_pidfdwhen the correspondingCommandwas created.Even if requested, a pidfd may not be available due to an older version of Linux being in use, or if some other error occurred.
fn into_pidfd(self: Self) -> crate::result::Result<PidFd, Self> where Self: SizedReturns the
PidFdcreated for thisChild, if available. Otherwise self is returned.A pidfd will only be available if its creation was requested with
create_pidfdwhen the correspondingCommandwas created.Taking ownership of the PidFd consumes the Child to avoid pid reuse races. Use
pidfdandBorrowedFd::try_clone_to_ownedif you don't want to disassemble the Child yet.Even if requested, a pidfd may not be available due to an older version of Linux being in use, or if some other error occurred.
Implementors
impl ChildExt for crate::process::Child