Home
last modified time | relevance | path

Searched refs:new_fd (Results 1 – 3 of 3) sorted by relevance

/frameworks/base/core/jni/
Dfd_utils.cpp336 const int new_fd = TEMP_FAILURE_RETRY(open(file_path.c_str(), open_flags)); in ReopenOrDetach() local
338 if (new_fd == -1) { in ReopenOrDetach()
345 if (TEMP_FAILURE_RETRY(fcntl(new_fd, F_SETFD, fd_flags)) == -1) { in ReopenOrDetach()
346 close(new_fd); in ReopenOrDetach()
348 new_fd, in ReopenOrDetach()
354 if (TEMP_FAILURE_RETRY(fcntl(new_fd, F_SETFL, fs_flags)) == -1) { in ReopenOrDetach()
355 close(new_fd); in ReopenOrDetach()
357 new_fd, in ReopenOrDetach()
363 if (offset != -1 && TEMP_FAILURE_RETRY(lseek64(new_fd, offset, SEEK_SET)) == -1) { in ReopenOrDetach()
364 close(new_fd); in ReopenOrDetach()
[all …]
Dcom_android_internal_os_ZygoteCommandBuffer.cpp229 void setFd(int new_fd) { in setFd() argument
230 mFd = new_fd; in setFd()
454 int new_fd = TEMP_FAILURE_RETRY(accept(zygote_socket_fd, nullptr, nullptr)); in com_android_internal_os_ZygoteCommandBuffer_nativeForkRepeatedly() local
455 if (new_fd == -1) { in com_android_internal_os_ZygoteCommandBuffer_nativeForkRepeatedly()
458 if (new_fd != session_socket) { in com_android_internal_os_ZygoteCommandBuffer_nativeForkRepeatedly()
461 if (TEMP_FAILURE_RETRY(dup2(new_fd, session_socket)) != session_socket) { in com_android_internal_os_ZygoteCommandBuffer_nativeForkRepeatedly()
463 new_fd, session_socket, strerror(errno))); in com_android_internal_os_ZygoteCommandBuffer_nativeForkRepeatedly()
465 close(new_fd); // On Linux, fd is closed even if EINTR is returned. in com_android_internal_os_ZygoteCommandBuffer_nativeForkRepeatedly()
/frameworks/native/libs/adbd_auth/
Dadbd_auth.cpp157 void ReplaceFrameworkFd(unique_fd new_fd) REQUIRES(mutex_) { in ReplaceFrameworkFd()
158 LOG(INFO) << "adbd_auth: received new framework fd " << new_fd.get() in ReplaceFrameworkFd()
169 if (new_fd != -1) { in ReplaceFrameworkFd()
177 CHECK_EQ(0, epoll_ctl(epoll_fd_.get(), EPOLL_CTL_ADD, new_fd.get(), &event)); in ReplaceFrameworkFd()
178 framework_fd_ = std::move(new_fd); in ReplaceFrameworkFd()