35 dup2(fd, STDOUT_FILENO);
57 if (waitpid(pid, &status, 0) == -1)
59 if (WIFSIGNALED(status))
60 return (128 + WTERMSIG(status));
61 return (WEXITSTATUS(status));
int execute_ast(t_ast *node, t_ms_data *data)
execute Abstract Syntax Tree
static int open_and_redirect(t_ast *node, t_ms_data *data)
int redirect_append(t_ast *node, t_ms_data *data)
int open_file(t_ast *node, char *direction)
open file in the context of redirection