/* By: ljiriste <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/05/02 13:22:57 by ljiriste #+# #+# */
-/* Updated: 2024/07/21 21:33:24 by ljiriste ### ########.fr */
+/* Updated: 2024/08/01 15:47:47 by ljiriste ### ########.fr */
/* */
/* ************************************************************************** */
typedef struct s_redirection
{
int from_to_fds[2];
- size_t created;
} t_redirection;
typedef struct s_execution_env
int stdout_fd;
int ret_val;
t_vars *vars;
- t_vec redirections;
} t_execution_env;
typedef t_parse_tree_node t_tree;
/* By: ljiriste <ljiriste@student.42prague.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/07/21 08:57:54 by ljiriste #+# #+# */
-/* Updated: 2024/08/01 15:43:00 by ljiriste ### ########.fr */
+/* Updated: 2024/08/01 15:51:03 by ljiriste ### ########.fr */
/* */
/* ************************************************************************** */
free(filename);
return (1);
}
- redir = (t_redirection){.from_to_fds[0] = fd, .from_to_fds[1] = sec_fd, .created = 0};
+ redir = (t_redirection){.from_to_fds[0] = fd, .from_to_fds[1] = sec_fd};
}
else
{
free(filename);
return (1);
}
- redir = (t_redirection){.from_to_fds[0] = fd, .from_to_fds[1] = sec_fd, .created = 1};
+ redir = (t_redirection){.from_to_fds[0] = fd, .from_to_fds[1] = sec_fd};
}
free(filename);
return (ft_vec_append(redirections, &redir) != success);
free(delimiter);
if (err)
return (1);
- redir = (t_redirection){.from_to_fds[0] = fd, .from_to_fds[1] = pipe_fds[0], .created = 1};
+ redir = (t_redirection){.from_to_fds[0] = fd, .from_to_fds[1] = pipe_fds[0]};
return (ft_vec_append(redirections, &redir) != success);
}