45 #include <sys/types.h>
74 #ifdef ENABLE_LIBMPDCLIENT
76 #define socket_cloexec_nonblock socket_cloexec_nonblock_noconflict
92 size_t *address_length_r);
int open_cloexec(const char *path_fs, int flags, int mode)
Wrapper for open(), which sets the CLOEXEC flag (atomically if supported by the OS).
int fd_set_cloexec(int fd, bool enable)
int socket_cloexec_nonblock(int domain, int type, int protocol)
Wrapper for socket(), which sets the CLOEXEC and the NONBLOCK flag (atomically if supported by the OS...
int pipe_cloexec_nonblock(int fd[2])
Wrapper for pipe(), which sets the CLOEXEC flag (atomically if supported by the OS).
int accept_cloexec_nonblock(int fd, struct sockaddr *address, size_t *address_length_r)
Wrapper for accept(), which sets the CLOEXEC and the NONBLOCK flags (atomically if supported by the O...
int close_socket(int fd)
Portable wrapper for close(); use closesocket() on WIN32/WinSock.