Trait std::os::linux::process::CommandExt

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.

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

© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/std/os/linux/process/trait.CommandExt.html