Lines Matching refs:fd
73 static void DupDescriptor(int error_fd, const char *file, int fd, int flags) { in DupDescriptor() argument
79 if (target_fd == fd) in DupDescriptor()
82 if (::dup2(target_fd, fd) == -1) in DupDescriptor()
93 int fd; member
109 bool has_action(int fd) const { in has_action()
111 if (action.fd == fd) in has_action()
128 if (close(action.fd) != 0) in ChildFunc()
132 if (dup2(action.fd, action.arg) == -1) in ChildFunc()
136 DupDescriptor(error_fd, action.path.c_str(), action.fd, action.arg); in ChildFunc()
178 int fd = std::stoi(iter->path().substr(proc_fd_path.size() + 1)); in ChildFunc() local
182 if (fd > 2 && !info.has_action(fd) && fd != error_fd) in ChildFunc()
183 files_to_close.push_back(fd); in ChildFunc()
190 for (int fd = 3; fd < max_fd; ++fd) in ChildFunc() local
191 if (!info.has_action(fd) && fd != error_fd) in ChildFunc()
192 close(fd); in ChildFunc()
226 : action(act.GetAction()), fd(act.GetFD()), path(act.GetPath().str()), in ForkFileAction()