Lines Matching refs:use_fd
283 int use_fd;
315 use_fd = pipes[fd][1];
316 if (use_fd < 0 || use_fd >= fd)
319 pipes[fd][1] = fcntl(use_fd, F_DUPFD_CLOEXEC, stdio_count);
321 pipes[fd][1] = fcntl(use_fd, F_DUPFD, stdio_count);
334 use_fd = pipes[fd][1];
336 if (use_fd < 0) {
343 use_fd = open("/dev/null", fd == 0 ? O_RDONLY : O_RDWR);
344 close_fd = use_fd;
346 if (use_fd < 0)
351 if (fd == use_fd) {
353 n = uv__cloexec(use_fd, 0);
359 fd = dup2(use_fd, fd);
539 int use_fd;
567 use_fd = pipes[fd][1];
568 if (use_fd < 0 || use_fd >= fd)
570 use_fd = stdio_count;
575 if (pipes[fd2][1] == use_fd) {
576 use_fd++;
583 use_fd);
587 pipes[fd][1] = use_fd;
592 use_fd = pipes[fd][1];
593 if (use_fd < 0) {
611 if (fd == use_fd)
614 err = posix_spawn_file_actions_adddup2(actions, use_fd, fd);
621 uv__nonblock_fcntl(use_fd, 0);
626 use_fd = pipes[fd][1];
627 if (use_fd < stdio_count)
632 if (pipes[fd2][1] == use_fd)
638 err = posix_spawn_file_actions_addclose(actions, use_fd);