Tracking Issue for linux_pidfd (original) (raw)

Feature gate: #![feature(linux_pidfd)]

This is a tracking issue for Linux-specific extension methods allowing to obtain process file descriptors for processes spawned with the standard Command API.

Public API

// std::os::linux::process

pub struct PidFd;

impl PidFd { pub fn kill(&self) -> Result<()> {...} pub fn wait(&self) -> Result {...} pub fn try_wait(&self) -> Result<Option> {...} }

impl AsRawFd for PidFd {} impl FromRawFd for PidFd {} impl IntoRawFd for PidFd {}

// sealed trait, implemented for std::process::Child pub trait ChildExt { fn pidfd(&self) -> Result<&PidFd>; fn into_pidfd(self) -> Result<PidFd, Self>; }

// sealed trait, implemented for std::process::Command pub trait CommandExt { fn create_pidfd(&mut self, val: bool) -> &mut process::Command; }

Steps / History

Unresolved Questions