diff --git a/src/util_libc.rs b/src/util_libc.rs index d7c3f6c1..68236097 100644 --- a/src/util_libc.rs +++ b/src/util_libc.rs @@ -111,9 +111,5 @@ pub unsafe fn open_readonly(path: &str) -> Result { if fd < 0 { return Err(last_os_error()); } - // O_CLOEXEC works on all Unix targets except for older Linux kernels (pre - // 2.6.23), so we also use an ioctl to make sure FD_CLOEXEC is set. - #[cfg(target_os = "linux")] - libc::ioctl(fd, libc::FIOCLEX); Ok(fd) }