system/fd_util: remove unused function open_cloexec()
This commit is contained in:
parent
3c7c0515d8
commit
0c1740982d
|
@ -101,26 +101,6 @@ fd_set_nonblock(int fd)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
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
|
int
|
||||||
pipe_cloexec_nonblock(int fd[2])
|
pipe_cloexec_nonblock(int fd[2])
|
||||||
{
|
{
|
||||||
|
|
|
@ -54,13 +54,6 @@ extern "C" {
|
||||||
int
|
int
|
||||||
fd_set_cloexec(int fd, bool enable);
|
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
|
* Wrapper for pipe(), which sets the CLOEXEC flag (atomically if
|
||||||
* supported by the OS).
|
* supported by the OS).
|
||||||
|
|
Loading…
Reference in New Issue