Skip to content

Commit

Permalink
clarify sys::unix::fd::FileDesc::drop comment (rust-lang#66876)
Browse files Browse the repository at this point in the history
  • Loading branch information
Borgerr committed Jul 7, 2024
1 parent a86fd0f commit ecc9025
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions std/src/os/fd/owned.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,11 @@ impl Drop for OwnedFd {
// the file descriptor was closed or not, and if we retried (for
// something like EINTR), we might close another valid file descriptor
// opened after we closed ours.
// However, this is usually justified, as some of the major Unices
// do make sure to always close the FD, even when `close()` is interrupted,
// and the scenario is rare to begin with.
// Helpful link to an epic discussion by POSIX workgroup:
// http://austingroupbugs.net/view.php?id=529
#[cfg(not(target_os = "hermit"))]
{
#[cfg(unix)]
Expand Down

0 comments on commit ecc9025

Please sign in to comment.