-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
Module docs for std::os::unix::io inconsistent with I/O Safety discussion in std::io #124384
Copy link
Copy link
Closed
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 toolsT-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.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-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 toolsT-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.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.
Location
https://doc.rust-lang.org/stable/std/os/unix/io/index.html
Summary
In std::io, it correctly says:
However the table in std::io::unix::io has the table saying:
This is incorrect and potentially very misleading, because the result of
dupping a file descriptor creates a new fd which shares the same underlying file structure in the kernel. In particular, for seekable fds they share the current file offset (ie, used byreadwriteandlseek) and in some cases, file locking state. (In addition to inode state and underlying file/pipe/etc contents.)The language here should reflect the language in std::io.