diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/system/fd_util.c | 20 | ||||
-rw-r--r-- | src/system/fd_util.h | 7 |
2 files changed, 0 insertions, 27 deletions
diff --git a/src/system/fd_util.c b/src/system/fd_util.c index d554ad796..72c1e830c 100644 --- a/src/system/fd_util.c +++ b/src/system/fd_util.c @@ -102,26 +102,6 @@ fd_set_nonblock(int fd) } int -open_cloexec(const char *path_fs, int flags, int mode) -{ - int fd; - -#ifdef O_CLOEXEC - flags |= O_CLOEXEC; -#endif - -#ifdef O_NOCTTY - flags |= O_NOCTTY; -#endif - - fd = open(path_fs, flags, mode); - if (fd >= 0) - fd_set_cloexec(fd, true); - - return fd; -} - -int pipe_cloexec_nonblock(int fd[2]) { #ifdef WIN32 diff --git a/src/system/fd_util.h b/src/system/fd_util.h index 1b0126f85..4442f32b4 100644 --- a/src/system/fd_util.h +++ b/src/system/fd_util.h @@ -55,13 +55,6 @@ int fd_set_cloexec(int fd, bool enable); /** - * Wrapper for open(), which sets the CLOEXEC flag (atomically if - * supported by the OS). - */ -int -open_cloexec(const char *path_fs, int flags, int mode); - -/** * Wrapper for pipe(), which sets the CLOEXEC flag (atomically if * supported by the OS). * |