Closed
Description
See the discussion in rust-lang/rust#72175, in particular this comment: dup2 and close (and potentially more operations) can be used to destroy file descriptors that might be owned by other libraries, which in turn can lead to internal invariants of those libraries being violated. For this reason, the standard library makes from_raw_fd
an unsafe operation. nix should, I think, follow suit and not expose safe operations that break the idea that a file descriptor can be exclusively owned.
Metadata
Metadata
Assignees
Labels
No labels