You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by qi...@apache.org on 2018/11/08 07:39:37 UTC

[mesos] 08/08: Removed the child hook `UNSET_CLOEXEC`.

This is an automated email from the ASF dual-hosted git repository.

qianzhang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit face988a52b0775f0c3e959d1f164212c1eba96c
Author: Qian Zhang <zh...@gmail.com>
AuthorDate: Mon Oct 8 16:06:31 2018 +0800

    Removed the child hook `UNSET_CLOEXEC`.
    
    We do not need this child hook since any file descripters need
    to unset the close-on-exec flag can be put in the `whitelist_fds`
    parameter of the `subprocess` method.
    
    Review: https://reviews.apache.org/r/68995
---
 3rdparty/libprocess/include/process/subprocess.hpp | 6 ------
 3rdparty/libprocess/src/subprocess.cpp             | 8 --------
 2 files changed, 14 deletions(-)

diff --git a/3rdparty/libprocess/include/process/subprocess.hpp b/3rdparty/libprocess/include/process/subprocess.hpp
index 135bf24..3b2653d 100644
--- a/3rdparty/libprocess/include/process/subprocess.hpp
+++ b/3rdparty/libprocess/include/process/subprocess.hpp
@@ -205,12 +205,6 @@ public:
      * `ChildHook` for duplicating a file descriptor.
      */
     static ChildHook DUP2(int oldFd, int newFd);
-
-    /**
-     * `ChildHook` to unset CLOEXEC on a file descriptor. This is
-     * useful to explicitly pass an FD to a subprocess.
-     */
-    static ChildHook UNSET_CLOEXEC(int fd);
 #endif // __WINDOWS__
 
     /**
diff --git a/3rdparty/libprocess/src/subprocess.cpp b/3rdparty/libprocess/src/subprocess.cpp
index 0bd7d54..ea812c3 100644
--- a/3rdparty/libprocess/src/subprocess.cpp
+++ b/3rdparty/libprocess/src/subprocess.cpp
@@ -112,14 +112,6 @@ Subprocess::ChildHook Subprocess::ChildHook::DUP2(int oldFd, int newFd)
     return os::dup2(oldFd, newFd);
   });
 }
-
-
-Subprocess::ChildHook Subprocess::ChildHook::UNSET_CLOEXEC(int fd)
-{
-  return Subprocess::ChildHook([fd]() -> Try<Nothing> {
-    return os::unsetCloexec(fd);
-  });
-}
 #endif // __WINDOWS__