about summary refs log tree commit diff
path: root/src/libstd/sys/vxworks/fs.rs
diff options
context:
space:
mode:
authorJoe Richey <joerichey@google.com>2019-07-28 23:09:21 -0700
committerJoe Richey <joerichey@google.com>2019-07-28 23:09:21 -0700
commit0cdd693bf6c8eb5aa0b4f2b2f82c545e5bd56f59 (patch)
tree6631b9654619ed61ba6b102d769d552669e0d6c8 /src/libstd/sys/vxworks/fs.rs
parent8b94e9e9188b65df38a5f1ae723617dc2dfb3155 (diff)
downloadrust-0cdd693bf6c8eb5aa0b4f2b2f82c545e5bd56f59.tar.gz
rust-0cdd693bf6c8eb5aa0b4f2b2f82c545e5bd56f59.zip
vxworks: Remove Linux-specific comments.
Diffstat (limited to 'src/libstd/sys/vxworks/fs.rs')
-rw-r--r--src/libstd/sys/vxworks/fs.rs17
1 files changed, 1 insertions, 16 deletions
diff --git a/src/libstd/sys/vxworks/fs.rs b/src/libstd/sys/vxworks/fs.rs
index 4eb185c4d57..d537d2258fd 100644
--- a/src/libstd/sys/vxworks/fs.rs
+++ b/src/libstd/sys/vxworks/fs.rs
@@ -287,22 +287,7 @@ impl File {
         let fd = cvt_r(|| unsafe {
             open(path.as_ptr(), flags, opts.mode as c_int)
         })?;
-        let fd = FileDesc::new(fd);
-        // Currently the standard library supports Linux 2.6.18 which did not
-        // have the O_CLOEXEC flag (passed above). If we're running on an older
-        // Linux kernel then the flag is just ignored by the OS. After we open
-        // the first file, we check whether it has CLOEXEC set. If it doesn't,
-        // we will explicitly ask for a CLOEXEC fd for every further file we
-        // open, if it does, we will skip that step.
-        //
-        // The CLOEXEC flag, however, is supported on versions of macOS/BSD/etc
-        // that we support, so we only do this on Linux currently.
-        fn ensure_cloexec(_: &FileDesc) -> io::Result<()> {
-            Ok(())
-        }
-
-        ensure_cloexec(&fd)?;
-        Ok(File(fd))
+        Ok(File(FileDesc::new(fd)))
     }
 
     pub fn file_attr(&self) -> io::Result<FileAttr> {