Lines Matching refs:fd
213 static void SetCloseOnExec(int fd) { in SetCloseOnExec() argument
216 UNUSED(fd); in SetCloseOnExec()
220 int flags = fcntl(fd, F_GETFD); in SetCloseOnExec()
222 PLOG(WARNING) << "fcntl(" << fd << ", F_GETFD) failed"; in SetCloseOnExec()
225 int rc = fcntl(fd, F_SETFD, flags | FD_CLOEXEC); in SetCloseOnExec()
227 PLOG(WARNING) << "fcntl(" << fd << ", F_SETFD, " << flags << ") failed"; in SetCloseOnExec()
248 ZipArchive* ZipArchive::OpenFromFd(int fd, const char* filename, std::string* error_msg) { in OpenFromFd() argument
249 return OpenFromFdInternal(fd, /*assume_ownership=*/true, filename, error_msg); in OpenFromFd()
252 ZipArchive* ZipArchive::OpenFromOwnedFd(int fd, const char* filename, std::string* error_msg) { in OpenFromOwnedFd() argument
253 return OpenFromFdInternal(fd, /*assume_ownership=*/false, filename, error_msg); in OpenFromOwnedFd()
274 ZipArchive* ZipArchive::OpenFromFdInternal(int fd, in OpenFromFdInternal() argument
279 DCHECK_GT(fd, 0); in OpenFromFdInternal()
282 const int32_t error = OpenArchiveFd(fd, filename, &handle, assume_ownership); in OpenFromFdInternal()