free_exit() renamed exit_free()

This commit is contained in:
LuckyLaszlo
2021-11-29 12:44:46 +01:00
parent 33f4878f36
commit b265e8475a
8 changed files with 16 additions and 16 deletions

View File

@@ -6,7 +6,7 @@
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/11/16 01:57:38 by lperrey #+# #+# */
/* Updated: 2021/11/29 12:26:27 by lperrey ### ########.fr */
/* Updated: 2021/11/29 12:43:52 by lperrey ### ########.fr */
/* */
/* ************************************************************************** */
@@ -83,7 +83,7 @@ static pid_t pipeline_exec(t_cmd *pipeline[], t_all *c)
{
ret = cmd_exec_in_subshell(pipeline[i], c);
if (ret != EXIT_SUCCESS)
free_exit(c, ret);
exit_free(c, ret);
}
i++;
}

View File

@@ -6,7 +6,7 @@
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/11/16 01:57:38 by lperrey #+# #+# */
/* Updated: 2021/11/29 12:26:33 by lperrey ### ########.fr */
/* Updated: 2021/11/29 12:43:55 by lperrey ### ########.fr */
/* */
/* ************************************************************************** */
@@ -29,7 +29,7 @@ int cmd_exec_in_subshell(t_cmd *cmd, t_all *c)
return (ft_reti_perror(EXIT_FAILURE, "dup2()"));
close_pipeline_fd(c->pipeline);
if (cmd->builtin_func)
free_exit(c, cmd->builtin_func(ft_2d_arrlen(cmd->argv), cmd->argv, c));
exit_free(c, cmd->builtin_func(ft_2d_arrlen(cmd->argv), cmd->argv, c));
else if (execve(cmd->path, cmd->argv, environ) == -1)
return (ft_reti_perror_io(EXIT_FAILURE, "execve() ", cmd->argv[0]));
}