Trait std::os::linux::process::ChildExt [−][src]
pub trait ChildExt: Sealed {
fn pidfd(&self) -> Result<&PidFd>;
fn take_pidfd(&mut self) -> Result<PidFd>;
}
This is supported on Linux only.
Expand description
特定于操作系统的 Child
的扩展
Required methods
获取对为此 Child
创建的 PidFd
的引用 (如果可用)。
只有在创建相应的 Command
时使用 create_pidfd
请求创建 pidfd 时,pidfd 才可用。
即使请求,pidfd 也可能不可用,因为正在使用旧版本的 Linux,或者如果发生了一些其他错误。
fn take_pidfd(&mut self) -> Result<PidFd>
fn take_pidfd(&mut self) -> Result<PidFd>
拥有为此 Child
创建的 PidFd
(如果可用) 的所有权。
只有在创建相应的 Command
时使用 create_pidfd
请求创建 pidfd 时,pidfd 才可用。
即使请求,pidfd 也可能不可用,因为正在使用旧版本的 Linux,或者如果发生了一些其他错误。