diff options
Diffstat (limited to '')
-rw-r--r-- | src/fd_util.c | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/src/fd_util.c b/src/fd_util.c index f296aab97..f78b8ed8b 100644 --- a/src/fd_util.c +++ b/src/fd_util.c @@ -101,7 +101,7 @@ fd_set_nonblock(int fd) } int -open_cloexec(const char *path_fs, int flags) +open_cloexec(const char *path_fs, int flags, int mode) { int fd; @@ -113,26 +113,6 @@ open_cloexec(const char *path_fs, int flags) flags |= O_NOCTTY; #endif - fd = open(path_fs, flags, 0666); - fd_set_cloexec(fd, true); - - return fd; -} - -int -creat_cloexec(const char *path_fs, int mode) -{ - int flags = O_CREAT|O_WRONLY|O_TRUNC; - int fd; - -#ifdef O_CLOEXEC - flags |= O_CLOEXEC; -#endif - -#ifdef O_NOCTTY - flags |= O_NOCTTY; -#endif - fd = open(path_fs, flags, mode); fd_set_cloexec(fd, true); |