- if (pipe (child_fd) != 0
- || (child_fd[0] = fd_safer (child_fd[0])) < 0
- || (fd[0] = fd_safer (child_fd[1])) < 0
- || pipe (pipe_fd) != 0
- || (fd[1] = fd_safer (pipe_fd[0])) < 0
- || (child_fd[1] = fd_safer (pipe_fd[1])) < 0)
- error (EXIT_FAILURE, errno,
- "pipe");
+ if (pipe_safer (child_fd) != 0 || pipe_safer (pipe_fd) != 0)
+ error (EXIT_FAILURE, errno, "pipe");
+ fd[0] = child_fd[1];
+ fd[1] = pipe_fd[0];
+ child_fd[1] = pipe_fd[1];