fixed the unfixable bug
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
/* By: marde-vr <marde-vr@42angouleme.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/02/07 14:12:49 by tomoron #+# #+# */
|
||||
/* Updated: 2024/03/24 16:27:24 by tomoron ### ########.fr */
|
||||
/* Updated: 2024/03/25 13:49:08 by marde-vr ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -62,7 +62,7 @@ void exec_command(t_msh *msh, int i, int cmd_count)
|
||||
}
|
||||
if (!cmd_is_builtin(msh, msh->cmds->token))
|
||||
get_cmd_path(msh);
|
||||
if(!g_return_code)
|
||||
//if(!g_return_code)
|
||||
exec(msh, get_cmd_args(msh), i, cmd_count);
|
||||
remove_command_from_msh(msh);
|
||||
}
|
||||
|
@ -6,7 +6,7 @@
|
||||
/* By: marde-vr <marde-vr@42angouleme.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/03/05 18:15:27 by marde-vr #+# #+# */
|
||||
/* Updated: 2024/03/24 09:56:01 by marde-vr ### ########.fr */
|
||||
/* Updated: 2024/03/25 13:49:06 by marde-vr ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -39,7 +39,6 @@ void open_input_file(t_msh *msh, t_cmd **cur_cmd)
|
||||
if (msh->in_fd == -1 && !g_return_code)
|
||||
{
|
||||
ft_printf_fd(2, "minishell: %s: ", (*cur_cmd)->next->token);
|
||||
//ft_printf_fd(2, "\nset return_code to 1\n");
|
||||
perror("");
|
||||
g_return_code = 1;
|
||||
}
|
||||
|
@ -6,7 +6,7 @@
|
||||
/* By: marde-vr <marde-vr@42angouleme.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/03/05 18:17:25 by marde-vr #+# #+# */
|
||||
/* Updated: 2024/03/25 12:36:14 by tomoron ### ########.fr */
|
||||
/* Updated: 2024/03/25 13:48:42 by marde-vr ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -62,6 +62,7 @@ void child(t_msh *msh, char **cmd_args, int i)
|
||||
|| msh->out_type == RED_O_APP)
|
||||
redirect_output(msh, i);
|
||||
close_pipe_fds(msh, i);
|
||||
//if (!g_return_code)
|
||||
execute_command(msh, cmd_args, i);
|
||||
close(0);
|
||||
close(1);
|
||||
|
Reference in New Issue
Block a user