Trait std::os::linux::process::CommandExt
pub trait CommandExt: Sealed { fn create_pidfd(&mut self, val: bool) -> &mut Command; }
This is supported on Linux only.
Os-specific extensions for Command
Required methods
fn create_pidfd(&mut self, val: bool) -> &mut Command
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
impl CommandExt for Command
© 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