Lines Matching refs:use_fd
262 int use_fd;
294 use_fd = pipes[fd][1];
295 if (use_fd < 0 || use_fd >= fd)
298 pipes[fd][1] = fcntl(use_fd, F_DUPFD_CLOEXEC, stdio_count);
300 pipes[fd][1] = fcntl(use_fd, F_DUPFD, stdio_count);
313 use_fd = pipes[fd][1];
315 if (use_fd < 0) {
322 use_fd = open("/dev/null", fd == 0 ? O_RDONLY : O_RDWR);
323 close_fd = use_fd;
325 if (use_fd < 0)
330 if (fd == use_fd) {
332 n = uv__cloexec(use_fd, 0);
338 fd = dup2(use_fd, fd);
519 int use_fd;
547 use_fd = pipes[fd][1];
548 if (use_fd < 0 || use_fd >= fd)
550 use_fd = stdio_count;
555 if (pipes[fd2][1] == use_fd) {
556 use_fd++;
563 use_fd);
567 pipes[fd][1] = use_fd;
572 use_fd = pipes[fd][1];
573 if (use_fd < 0) {
591 if (fd == use_fd)
594 err = posix_spawn_file_actions_adddup2(actions, use_fd, fd);
601 uv__nonblock_fcntl(use_fd, 0);
606 use_fd = pipes[fd][1];
607 if (use_fd < stdio_count)
612 if (pipes[fd2][1] == use_fd)
618 err = posix_spawn_file_actions_addclose(actions, use_fd);