-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
[Feature request] Pass file descriptors in std::comand::Command #144191
Copy link
Copy link
Closed
Labels
A-processArea: `std::process` and `std::env`Area: `std::process` and `std::env`C-discussionCategory: Discussion or questions that doesn't represent real issues.Category: Discussion or questions that doesn't represent real issues.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-processArea: `std::process` and `std::env`Area: `std::process` and `std::env`C-discussionCategory: Discussion or questions that doesn't represent real issues.Category: Discussion or questions that doesn't represent real issues.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
I was reading bytecodealliance/rustix#100 (comment) and remembered that Rust's std doesn't have a way to pass (non-stdio) file descriptors to child processes.
I was wondering, could a way to do that be added into
std::command::Command?I also propose these properties:
LISTEN_FDSenvironment variable. Maybe the user provides the FD numbers and the library usesdup2?close_fds=True(is this applicable? not sure how it's implemented in Python)Prior work:
cap_std_ext::CapStdExtCommandExt