Lines Matching refs:fd
53 bool SetCloexecFlag(int fd) {
54 int flags = ::fcntl(fd, F_GETFD);
57 return (::fcntl(fd, F_SETFD, flags | FD_CLOEXEC) == 0);
161 int fd = llvm::sys::RetryAfterSignal(-1, ::open, name.data(), flags);
162 if (fd != -1)
163 m_fds[READ] = fd;
192 int fd = ::open(name.data(), flags);
193 if (fd == -1) {
202 m_fds[WRITE] = fd;
214 const int fd = m_fds[READ];
216 return fd;
220 const int fd = m_fds[WRITE];
222 return fd;
263 const int fd = GetReadFileDescriptor();
267 select_helper.FDSetRead(fd);
274 ::read(fd, static_cast<char *>(buf) + bytes_read, size - bytes_read);
295 const int fd = GetWriteFileDescriptor();
298 select_helper.FDSetWrite(fd);
304 auto result = ::write(fd, static_cast<const char *>(buf) + bytes_written,