Repository: mesos
Updated Branches:
  refs/heads/master b9c01fc36 -> 105eca66a


Removed a redundant CLOEXEC from linux/ns.hpp.

The call to `os::open` that creates the FD includes O_CLOEXEC.
This will set CLOEXEC on the FD before `os::open` returns.

Review: https://reviews.apache.org/r/50357/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/7c0234ce
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/7c0234ce
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/7c0234ce

Branch: refs/heads/master
Commit: 7c0234ced35f465de4631f7d19158a05c5628ba9
Parents: b9c01fc
Author: Joseph Wu <jos...@mesosphere.io>
Authored: Fri Jul 22 15:35:49 2016 -0700
Committer: Joseph Wu <josep...@apache.org>
Committed: Fri Jul 22 15:35:49 2016 -0700

----------------------------------------------------------------------
 src/linux/ns.hpp | 8 --------
 1 file changed, 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/7c0234ce/src/linux/ns.hpp
----------------------------------------------------------------------
diff --git a/src/linux/ns.hpp b/src/linux/ns.hpp
index 4e843b7..e905aef 100644
--- a/src/linux/ns.hpp
+++ b/src/linux/ns.hpp
@@ -150,14 +150,6 @@ inline Try<Nothing> setns(const std::string& path, const 
std::string& ns)
     return Error("Failed to open '" + path + "': " + fd.error());
   }
 
-#ifndef O_CLOEXEC
-  Try<Nothing> cloexec = os::cloexec(fd.get());
-  if (cloexec.isError()) {
-    os::close(fd.get());
-    return Error("Failed to cloexec: " + cloexec.error());
-  }
-#endif
-
   Try<int> nstype = ns::nstype(ns);
   if (nstype.isError()) {
     return Error(nstype.error());

Reply via email to