Lines Matching refs:pipes
258 int (*pipes)[2],
294 use_fd = pipes[fd][1];
298 pipes[fd][1] = fcntl(use_fd, F_DUPFD_CLOEXEC, stdio_count);
300 pipes[fd][1] = fcntl(use_fd, F_DUPFD, stdio_count);
302 if (pipes[fd][1] == -1)
305 n = uv__cloexec(pipes[fd][1], 1);
313 use_fd = pipes[fd][1];
516 int (*pipes)[2]) {
540 /* Do not return ENOSYS after this point, as we may mutate pipes. */
547 use_fd = pipes[fd][1];
555 if (pipes[fd2][1] == use_fd) {
562 pipes[fd][1],
567 pipes[fd][1] = use_fd;
572 use_fd = pipes[fd][1];
606 use_fd = pipes[fd][1];
612 if (pipes[fd2][1] == use_fd)
751 int (*pipes)[2],
762 /* This may mutate pipes. */
767 pipes);
791 int (*pipes)[2],
815 uv__process_child_init(options, stdio_count, pipes, error_fd);
834 int (*pipes)[2],
860 pipes,
899 err = uv__spawn_and_init_child_fork(options, stdio_count, pipes, signal_pipe[1], pid);
943 int (*pipes)[2];
968 pipes = pipes_storage;
970 pipes = uv__malloc(stdio_count * sizeof(*pipes));
972 if (pipes == NULL)
976 pipes[i][0] = -1;
977 pipes[i][1] = -1;
981 err = uv__process_init_stdio(options->stdio + i, pipes[i]);
991 exec_errorno = uv__spawn_and_init_child(loop, options, stdio_count, pipes, &pid);
1024 err = uv__process_open_stream(options->stdio + i, pipes[i]);
1034 if (pipes != pipes_storage)
1035 uv__free(pipes);
1040 if (pipes != NULL) {
1045 if (pipes[i][0] != -1)
1046 uv__close_nocheckstdio(pipes[i][0]);
1047 if (pipes[i][1] != -1)
1048 uv__close_nocheckstdio(pipes[i][1]);
1051 if (pipes != pipes_storage)
1052 uv__free(pipes);