Lines Matching refs:fd
36 #include "fd.h"
38 int fd_move_cloexec(int fd)
42 newfd = fcntl(fd,
50 return fd;
56 close(fd);
60 int fd_set_cloexec(int fd)
64 if (fd == -1)
65 return fd;
68 flags = fcntl(fd, F_GETFD);
71 fcntl(fd, F_SETFD, flags);
75 return fd;
78 int fd_set_nonblock(int fd)
82 if (fd == -1)
83 return fd;
85 flags = fcntl(fd, F_GETFL);
88 fcntl(fd, F_SETFL, flags);
91 return fd;