From fe535a21f0dff710e0658563f66713d4881da86f Mon Sep 17 00:00:00 2001 From: Camille Chauvet Date: Wed, 5 Apr 2023 12:32:34 +0200 Subject: [PATCH] fix: no exit when ft_exit return -2 --- execution/execution.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/execution/execution.c b/execution/execution.c index 823adc8..81e0645 100644 --- a/execution/execution.c +++ b/execution/execution.c @@ -6,7 +6,7 @@ /* By: cchauvet = 0) { data->exit_code = return_code; - return (-1); + return (-2); } } data->exit_code = return_code; @@ -70,7 +70,7 @@ static int ft_cmd_executor(t_data *data, t_cmd *cmd) exit_code = ft_execute_own_cmd(data, cmd); ft_closer(cmd->fd_in); ft_closer(cmd->fd_out); - if (exit_code == -1) + if (exit_code == -2) return (1); } else