From 06f6308bc4f46e0b81ed2d60a49c8166877faed0 Mon Sep 17 00:00:00 2001 From: Camille Chauvet Date: Tue, 28 Feb 2023 14:57:16 +0100 Subject: [PATCH] merge --- execution.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/execution.c b/execution.c index 0a9c275..4401e91 100644 --- a/execution.c +++ b/execution.c @@ -123,12 +123,13 @@ static int ft_own_cmd(t_data *data, t_cmd *cmd) data->exit_code = exit_code; return_code = -2; } + else + return_code = -3; } - if (return_code != -1 && return_code != -2) - { - cmd->executable = NULL; + if (return_code >= 0) data->exit_code = return_code; - } + if (return_code != -1) + cmd->executable = NULL; return (return_code); }