Trait CommandExt
trait CommandExt: Sealed
Os-specific extensions for Command
Required Methods
fn create_pidfd(self: &mut Self, val: bool) -> &mut process::CommandSets whether a
PidFdshould be created for theChildspawned by thisCommand. By default, no pidfd will be created.The pidfd can be retrieved from the child with
pidfdorinto_pidfd.A pidfd will only be created if it is possible to do so in a guaranteed race-free manner. Otherwise,
pidfdwill return an error.If a pidfd has been successfully created and not been taken from the
Childthen calls tokill(),wait()andtry_wait()will use the pidfd instead of the pid. This can prevent pid recycling races, e.g. those caused by rogue libraries in the same process prematurely reaping zombie children viawaitpid(-1, ...)calls.
Implementors
impl CommandExt for process::Command