fix: non nuiltins is now startable

This commit is contained in:
Camille Chauvet
2023-03-10 13:34:23 +01:00
parent 1a4ed128e7
commit 087a96e54b
7 changed files with 20 additions and 21 deletions

View File

@ -32,7 +32,7 @@ static int ft_own_cmd(t_data *data, t_cmd *cmd)
else if (ft_strcmp(cmd->executable, "exit") == 0)
{
return_code = ft_exit(cmd->args + 1);
if (return_code > 0)
if (return_code >= 0)
{
data->exit_code = return_code;
return (-1);
@ -110,6 +110,5 @@ int ft_cmds_executor(t_data *data)
ft_closer(content->fd_out);
current = current->next;
}
ft_lstiter(*data->cmds, ft_cmd_waiter);
return (0);
}