Trait std::os::linux::process::CommandExt[][src]

pub trait CommandExt: Sealed {
    fn create_pidfd(&mut self, val: bool) -> &mut Command;
}
🔬 This is a nightly-only experimental API. (linux_pidfd #82971)
This is supported on Linux only.
Expand description

Os-specific extensions for Command

Required methods

🔬 This is a nightly-only experimental API. (linux_pidfd #82971)

Sets whether a PidFd should be created for the Child spawned by this Command. By default, no pidfd will be created.

The pidfd can be retrieved from the child with pidfd or take_pidfd.

A pidfd will only be created if it is possible to do so in a guaranteed race-free manner (e.g. if the clone3 system call is supported). Otherwise, pidfd will return an error.

Implementors