pub trait ChildExt: Sealed {
// Required methods
fn pidfd(&self) -> Result<&PidFd, Error>;
fn take_pidfd(&mut self) -> Result<PidFd, Error>;
}
🔬This is a nightly-only experimental API. (
linux_pidfd
)Available on Linux only.
Expand description
Os-specific extensions for Child
Required Methods§
sourcefn pidfd(&self) -> Result<&PidFd, Error>
🔬This is a nightly-only experimental API. (linux_pidfd
)
fn pidfd(&self) -> Result<&PidFd, Error>
linux_pidfd
)Obtains a reference to the PidFd
created for this Child
, if available.
A pidfd will only be available if its creation was requested with
create_pidfd
when the corresponding Command
was 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.
sourcefn take_pidfd(&mut self) -> Result<PidFd, Error>
🔬This is a nightly-only experimental API. (linux_pidfd
)
fn take_pidfd(&mut self) -> Result<PidFd, Error>
linux_pidfd
)Takes ownership of the PidFd
created for this Child
, if available.
A pidfd will only be available if its creation was requested with
create_pidfd
when the corresponding Command
was 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.