Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add # Safety to close_range
  • Loading branch information
Chris Pick committed Oct 5, 2023
commit 6129a9e3790e2818a2c5f3a43b767bc73106c274
2 changes: 2 additions & 0 deletions src/unistd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1112,6 +1112,8 @@ libc_bitflags! {
/// Close a range of raw file descriptors.
/// [close_range(2)](https://man7.org/linux/man-pages/man2/close_range.2.html).
///
/// # Safety
///
/// Be aware that many Rust types implicitly close-on-drop, including
/// `std::fs::File`. Explicitly closing them with this method too can result in
/// a double-close condition, which can cause confusing `EBADF` errors in
Expand Down