Repository navigation
docs: platform gap — foreign children cannot receive exec-established numbered fds (#378) - #580
Merged
Merged
Conversation
… numbered fds (#378) Durable record for rubash#378, closed as platform-gap: Windows has no fork-style fd-table inheritance (std::process passes exactly three std handles), so a foreign child that itself dups an fd established by an enclosing `exec N>&M` cannot receive it. Documents the OS-level facts (filter-only handle-list attr; three STARTF_USESTDHANDLES slots; DuplicateHandle out-param), the CRT io-inherit-block channel and its reserved-field boundary (MSYS2 children unreachable), the runtimes that land in the same place (Cygwin/Python/libuv/Rust std), and the supported-forms ledger: stdio redirections, planned redirects resolved against the fd table (#370), /dev/fd/N argv rewriting (dev_fd_operands.rs:285), and the cooperative __RUBASH_FD_* channel (external_inner.rs:755). No GPL source pasted; semantics anchored by file:line.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Durable documentation for rubash#378, closed as
platform-gap. Addsdocs/platform-fd-inheritance.md:exec N>&Mcontract (redir.c:1170/1188-1192) relies on fork-style full fd-table inheritance, which Windows cannot express for foreign children —std::processpasses exactly three std handles.PROC_THREAD_ATTRIBUTE_HANDLE_LISTis a filter,STARTF_USESTDHANDLEShas exactly three value-remapping slots,DuplicateHandle's target value is[out]— anchored to Microsoft docs; plus the CRTlpReserved2io-inherit-block channel, its "Reserved for use by the C Run-time" boundary, and why MSYS2 children are unreachable (their runtime claims the same reserved field — fork.cc:341-342).pass_fdsPOSIX-only), libuv (privatelpReserved2layout), Rust std (no mapping API)./dev/fd/Nargv rewriting on Windows (dev_fd_operands.rs:285); the cooperative__RUBASH_FD_*env-key channel for rubash→rubash children (external_inner.rs:755).platform-identity.md) is load-bearing. A one-paragraph "if ever needed" candidate route (handle-reuse naming protocol / UCRT-only io-inherit bridge) is recorded without commitment.No GPL C source is reproduced; all GNU/Cygwin/Wine/libuv semantics are anchored by file:line references.
Closes #378 (closed via issue comment after merge, per verdict).
Checklist