This commit is contained in:
Etienne Rey-bethbeder 2023-04-05 12:21:59 +02:00
commit d99aa39070

View File

@ -6,7 +6,7 @@
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */ /* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2023/02/21 12:45:16 by cchauvet #+# #+# */ /* Created: 2023/02/21 12:45:16 by cchauvet #+# #+# */
/* Updated: 2023/03/31 16:32:38 by alouis-j ### ########.fr */ /* Updated: 2023/04/05 12:18:52 by alouis-j ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -30,7 +30,7 @@ static int ft_execute_own_cmd(t_data *data, t_cmd *cmd)
return_code = (echo(cmd->fd_out[0], cmd->args + 1)); return_code = (echo(cmd->fd_out[0], cmd->args + 1));
else else
{ {
return_code = ft_exit(cmd->args + 1); return_code = ft_exit(cmd->args + 1, data->exit_code);
if (return_code >= 0) if (return_code >= 0)
{ {
data->exit_code = return_code; data->exit_code = return_code;