Commit 6c9aec68 authored by abenoit's avatar abenoit
Browse files

ambig redir doesn t stop token creation

parent 56c61045
......@@ -105,7 +105,11 @@ int handle_execution(t_xe *xe, int fd_in, int proc)
if (cur_command->redir_types != NULL && cur_command->redir_types[0] == AMBIG)
{
free_command(cur_command);
return (AMBIG_REDIR);
if (ft_error(AMBIG_REDIR, xe) != SUCCESS)
return (FAILURE);
dup2(xe->backup_stdout, STDOUT_FILENO);
dup2(xe->backup_stdin, STDIN_FILENO);
return (handle_execution(xe, fd_in, proc));
}
if (cur_command->args != NULL)
{
......
......@@ -6,7 +6,7 @@
/* By: mvidal-a <mvidal-a@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/02/01 11:25:06 by mvidal-a #+# #+# */
/* Updated: 2021/02/01 11:25:09 by mvidal-a ### ########.fr */
/* Updated: 2021/02/01 19:20:42 by abenoit ### ########.fr */
/* */
/* ************************************************************************** */
......@@ -39,6 +39,7 @@ int parse_input(char **line, char **env, int stat_loc,
return (FAILURE);
return (SUCCESS);
}
#include "libft.h"
t_command *parse_one_command(t_xe *xe)
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment