-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarification of default socket flags #88805
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @yaahc (or someone else) soon. Please see the contribution instructions for more information. |
As an additional comment, I was unsure where this form of documentation belongs as its a design decision that is done throughout the Rust networking stack, but also is an implementation detail. I do think default options/flags should be explicitly stated somewhere though. |
This seems like as good a place as any. The other option I can think of would be to copy-paste this same explanation into the docs of every function where this info applies.
That's fair, though I want to note that we treat comments like these in our documentations as part of our stable API so this will require approval from the entire libs-api team. Also (mostly unrelated) thanks for the first contribution! @rust-lang/libs-api do we want to document a commitment to disable socket inheritance where possible? @rfcbot merge |
Team member @yaahc has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
This is generally true for any kind of handle or file descriptor: we always set cloexec or equivalent. This doesn't seem like a change in our policy, just documentation of the existing policy. @rfcbot reviewed |
If this is the direction you folks would like to go I have no problem putting these default flags where applicable, the change would just effect far more files.
Thank you! Really enjoying rust so far and hope to contribute more substantially in the future! |
@krhancoc I'd love to see a canonical explanation added to some module documentation (e.g. |
That sounds great. I can go craft that up -- would you folks rather it extend on top of this pull request or as a different one? |
🔔 This is now entering its final comment period, as per the review above. 🔔 |
@krhancoc As a separate PR, please. And thank you for working on this! |
The final comment period, with a disposition to merge, as per the review above, is now complete. As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed. This will be merged soon. |
triage: It looks like the FCP finished. @yaahc I believe this is waiting on your review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
@bors r+ rollup |
📌 Commit a10f095 has been approved by |
Clarification of default socket flags This PR outlines the decision to disable inheritance of socket objects when possible to child processes in the documentation.
Rollup of 10 pull requests Successful merges: - rust-lang#88805 (Clarification of default socket flags) - rust-lang#93418 (rustdoc & doc: no `shortcut` for `rel="icon"`) - rust-lang#93913 (Remove the everybody loops pass) - rust-lang#93965 (Make regular stdio lock() return 'static handles) - rust-lang#94339 (ARM: Only allow using d16-d31 with asm! when supported by the target) - rust-lang#94404 (Make Ord and PartialOrd opt-out in `newtype_index`) - rust-lang#94466 (bootstrap: correct reading of flags for llvm) - rust-lang#94572 (Use `HandleOrNull` and `HandleOrInvalid` in the Windows FFI bindings.) - rust-lang#94575 (CTFE SwitchInt: update comment) - rust-lang#94582 (Fix a bug in `x.py fmt` that prevents some files being formatted.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This PR outlines the decision to disable inheritance of socket objects when possible to child processes in the documentation.