-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
Open
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.E-mediumCall for participation: Medium difficulty. Experience needed to fix: Intermediate.Call for participation: Medium difficulty. Experience needed to fix: Intermediate.P-mediumMedium priorityMedium priorityT-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.
Description
Hello, the TcpSocket try_clone() method calls into .duplicate(), which sets the close-on-exec flag on the socket:
https://doc.rust-lang.org/src/std/net/tcp.rs.html#255-257
https://github.com/rust-lang/rust/blob/master/src/libstd/sys/unix/fd.rs#L197
I believe the documentation for try_clone() should be extended to describe:
- That this is an operation with the underlying operating system, dup() or WSADuplicateSocket() or whatever is appropriate
(this would help address very similar issue 45536) - That the duplication operation also sets the close-on-exec flag.
Thanks
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.E-mediumCall for participation: Medium difficulty. Experience needed to fix: Intermediate.Call for participation: Medium difficulty. Experience needed to fix: Intermediate.P-mediumMedium priorityMedium priorityT-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.