Repository navigation
Share POSIX IDs and prepare subprocess inputs - #9677
Draft
youknowdot wants to merge 4 commits into
Draft
youknowdot wants to merge 4 commits into
youknowdot wants to merge 4 commits into
Conversation
Reuse common UID and GID converters for POSIX controls and account lookups. Honor index-enabled arguments, C-long conversion boundaries, and sentinel formatting while preserving lookup allocation errors. Assisted-by: OpenAI Codex:model version not exposed
Bring AsObject into pwd for exception classification and remove the obsolete POSIX PyObject import. Assisted-by: OpenAI Codex:model version not exposed
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Assisted-by: OpenAI Codex: model version not exposed
Match parent-side conversion and validation order while reusing the shared POSIX ID converters. Keep original audit objects, bytes-path lifetimes and live argv list mutation behavior; adapt child descriptors as raw integers without fabricated borrowed lifetimes. Add bounded host-only tests for descriptor errors and owned pipe operations. Assisted-by: OpenAI Codex: model version not exposed
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
Group the shared POSIX account converters with the subprocess preparation that consumes them.
pwd.getpwuid,grp.getgrgid, and_posixsubprocess, including index-enabled values, C-long overflow behavior, and the -1 sentinel._posixsubprocess.fork_execwith the original executable, argv, and environment objects after native preparation and before fork. Acceptargs=None, distinguish bytes-only executable/environment sequences from filesystem paths, and retain live argv mutation checks and converted bytes lifetimes.BorrowedFd<'static>validity. Typed host APIs share the same implementation; child syscall order, credential order, and error-pipe serialization remain unchanged.References: CPython 3.15.0 _posixsubprocess, Clinic binding, ID converters, pwd, and grp.
Validation
Remaining scope
This remains a draft. RustPython runtime, full workspace/C-API suites, and cross-platform execution were not run. No Lib, snippet, workflow, or expected-failure marker edits; the existing audit marker remains until guarded runtime validation.
The compile-time extra-group cap is supplied for Linux GNU, macOS, FreeBSD, and NetBSD. Other targets retain their existing uncapped preparation; runtime
sysconfis not substituted for CPython's header constant. Existing preexec GC/fork callbacks and child algorithms are outside this patch. The shared iterable collector's partial-result destruction order when iteration itself fails is also unchanged.AI assistance: OpenAI Codex performed source comparison, implementation, reference probes, validation, and independent source review; model version was not exposed.