Lines Matching refs:fd_
27 UniqueFd(int fd) : fd_(fd) { in UniqueFd()
30 fd_ = rhs.fd_; in UniqueFd()
31 rhs.fd_ = -1; in UniqueFd()
40 if (fd_ >= 0) in ~UniqueFd()
41 close(fd_); in ~UniqueFd()
45 int old_fd = fd_; in Release()
46 fd_ = -1; in Release()
51 if (fd_ >= 0) in Set()
52 close(fd_); in Set()
53 fd_ = fd; in Set()
54 return fd_; in Set()
58 if (fd_ >= 0) in Close()
59 close(fd_); in Close()
60 fd_ = -1; in Close()
64 return fd_; in get()
68 int fd_ = -1;
73 OutputFd(int *fd) : fd_(fd) { in OutputFd()
76 fd_ = rhs.fd_; in OutputFd()
77 rhs.fd_ = NULL; in OutputFd()
81 fd_ = rhs.fd_;
82 rhs.fd_ = NULL;
87 if (*fd_ >= 0) in Set()
88 close(*fd_); in Set()
89 *fd_ = fd; in Set()
94 return *fd_; in get()
98 return fd_ != NULL;
102 int *fd_ = NULL;