#include "shell.h"
#include "tokens.h"
Go to the source code of this file.
◆ WAIT_NEXT_COMMAND
#define WAIT_NEXT_COMMAND 1 |
◆ builtin_pipe()
Definition at line 46 of file pipe.c.
47{
48 pid_t pid_1;
49 pid_t pid_2;
50 int status_1;
51 int status_2;
52 int setup_result;
53
54 status_1 = 0;
55 status_2 = 0;
59 if (pid_1 > 0 && waitpid(pid_1, &status_1, 0) == -1)
61 if (pid_2 > 0)
62 {
63 if (waitpid(pid_2, &status_2, 0) == -1)
65 return (WEXITSTATUS(status_2));
66 }
67 return (WEXITSTATUS(status_1));
68}
static int setup_pipe_processes(t_ast *node, t_ms_data *data, pid_t *pid_1, pid_t *pid_2)
#define WAIT_NEXT_COMMAND
References ft_perror(), setup_pipe_processes(), and WAIT_NEXT_COMMAND.
Referenced by builtin_pipe_test(), and execute_ast().