|
|
@ -6,7 +6,7 @@ |
|
|
|
/* By: mea <marvin@42.fr> +#+ +:+ +#+ */ |
|
|
|
/* +#+#+#+#+#+ +#+ */ |
|
|
|
/* Created: 2022/05/03 11:48:16 by narnaud #+# #+# */ |
|
|
|
/* Updated: 2022/05/16 10:42:40 by mea ### ########.fr */ |
|
|
|
/* Updated: 2022/05/16 11:57:13 by narnaud ### ########.fr */ |
|
|
|
/* */ |
|
|
|
/* ************************************************************************** */ |
|
|
|
|
|
|
@ -119,9 +119,9 @@ int caller(t_datas *datas, t_command *cmd) |
|
|
|
if (cmd->ope == PIPE) |
|
|
|
caller(datas, cmd->next); |
|
|
|
waitpid(cmd->pid, &status, 0); |
|
|
|
datas->exit_code = handle_status(datas, status); |
|
|
|
if (cmd->ope != PIPE) |
|
|
|
{ |
|
|
|
datas->exit_code = handle_status(datas, status); |
|
|
|
while (cmd->next && !((cmd->ope == AND && !datas->exit_code) \ |
|
|
|
|| (cmd->ope == OR && datas->exit_code))) |
|
|
|
cmd = cmd->next; |
|
|
|