mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-14 14:03:58 +00:00
fds: add comment on O_CLOEXEC fallback being dropped
This commit is contained in:
parent
bee422fea2
commit
87307775fc
1 changed files with 2 additions and 0 deletions
|
@ -172,6 +172,8 @@ pub fn wopen_cloexec(pathname: &wstr, flags: i32, mode: libc::c_int) -> RawFd {
|
|||
|
||||
/// Narrow versions of wopen_cloexec.
|
||||
pub fn open_cloexec(path: &CStr, flags: i32, mode: libc::c_int) -> RawFd {
|
||||
// Port note: the C++ version of this function had a fallback for platforms where
|
||||
// O_CLOEXEC is not supported, using fcntl. In 2023, this is no longer needed.
|
||||
unsafe { libc::open(path.as_ptr(), flags | O_CLOEXEC, mode) }
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue