Lines Matching refs:desired_fd
44 ms_windows_dup2 (int fd, int desired_fd) in ms_windows_dup2() argument
51 if (fd == desired_fd) in ms_windows_dup2()
63 if (desired_fd < 0) in ms_windows_dup2()
71 result = dup2 (fd, desired_fd); in ms_windows_dup2()
81 result = desired_fd; in ms_windows_dup2()
91 rpl_dup2 (int fd, int desired_fd) in rpl_dup2() argument
99 if (fd == desired_fd) in rpl_dup2()
103 result = dup2 (fd, desired_fd); in rpl_dup2()
109 if (fd != desired_fd && result != -1) in rpl_dup2()
121 dupfd (int fd, int desired_fd) in dupfd() argument
124 if (duplicated_fd < 0 || duplicated_fd == desired_fd) in dupfd()
128 int r = dupfd (fd, desired_fd); in dupfd()
138 dup2 (int fd, int desired_fd) in dup2() argument
141 if (result == -1 || fd == desired_fd) in dup2()
143 close (desired_fd); in dup2()
145 result = fcntl (fd, F_DUPFD, desired_fd); in dup2()
151 result = dupfd (fd, desired_fd); in dup2()