replaced occurrences of last exit_status
+ deleted envp comments + WIP Macro exit status + TODO : Invalid free of environ in readline
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2021/11/16 01:57:38 by lperrey #+# #+# */
|
||||
/* Updated: 2021/11/18 23:08:16 by hulamy ### ########.fr */
|
||||
/* Updated: 2021/11/27 10:48:13 by lperrey ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -25,7 +25,7 @@ int pipeline(t_all *c)
|
||||
if (ft_2d_arrlen(c->cmd_arr) == 1 && c->cmd_arr[0]->builtin_func)
|
||||
simple_command_builtin(c->cmd_arr[0], c);
|
||||
else
|
||||
wait_subshell(pipeline_exec(c->cmd_arr, c), &c->last_exit_status);
|
||||
wait_subshell(pipeline_exec(c->cmd_arr, c));
|
||||
free_pipeline(&c->cmd_arr);
|
||||
return (1);
|
||||
}
|
||||
@@ -90,6 +90,6 @@ static pid_t pipeline_exec(t_cmd *pipeline[], t_all *c)
|
||||
close_pipeline_fd(c->cmd_arr);
|
||||
i -= 1;
|
||||
if (pipeline[i]->error)
|
||||
c->last_exit_status = pipeline[i]->error;
|
||||
set_last_exit_status(pipeline[i]->error);
|
||||
return (pipeline[i]->pid);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user