Module docs for std::os::unix::io inconsistent with I/O Safety discussion in std::io #124384
Labels
A-docs
Area: documentation for any part of the project, including the compiler, standard library, and tools
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
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
dup
ping 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 byread
write
andlseek
) 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.
The text was updated successfully, but these errors were encountered: