Feature gate: #![feature(command_pass_fds)]
This is a tracking issue for passing file descriptors in std::comand::Command with std::os::fd::CommandExt::fd.
Public API
// std::os::unix::process
pub trait CommandExt {
fn fd(&mut self, new_fd: RawFd, old_fd: impl Into<OwnedFd>);
}
impl CommandExt for std::process::Command { ... }
Note: if a lifetime can be introduced to std::process::Command at any time in the future, we should make this use BorrowedFd.
Steps / History
(Remember to update the S-tracking-* label when checking boxes.)
Unresolved Questions
- Whether to name the function
fd or pass_fd
- Is this also available on
cfg(any(target_os = "hermit", target_os = "trusty", target_os = "wasi"))?
Feature gate:
#![feature(command_pass_fds)]This is a tracking issue for passing file descriptors in
std::comand::Commandwithstd::os::fd::CommandExt::fd.Public API
Note: if a lifetime can be introduced to
std::process::Commandat any time in the future, we should make this useBorrowedFd.Steps / History
(Remember to update the
S-tracking-*label when checking boxes.)Unresolved Questions
fdorpass_fdcfg(any(target_os = "hermit", target_os = "trusty", target_os = "wasi"))?Footnotes
https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html ↩