🔨」 fix: leak from heredoc

This commit is contained in:
2024-08-13 13:49:47 +02:00
parent 4b8b7b43d1
commit 7116688ec5
8 changed files with 24 additions and 21 deletions

View File

@ -6,7 +6,7 @@
/* By: mmoussou <mmoussou@student.42angouleme.fr +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/04/29 13:20:22 by mmoussou #+# #+# */
/* Updated: 2024/08/06 17:00:05 by adjoly ### ########.fr */
/* Updated: 2024/08/13 13:44:32 by adjoly ### ########.fr */
/* */
/* ************************************************************************** */
@ -51,7 +51,7 @@ void __fork_single_cmd(t_cmd *cmd, char **env, t_env *env_t, t_exec exec);
*
* @return (int) fd of a file containing the user's input, or -1 on error
*/
int ft_heredoc(char *delimiter);
int ft_heredoc(char *delimiter, t_list *list);
int __open_fd_here(char *path, int mode);
void ft_lstclear_till_nxt(t_list **lst, void (*del)(void *));
int get_fd_heredoc(int in);

View File

@ -6,7 +6,7 @@
/* By: mmoussou <mmoussou@student.42angouleme.fr +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/04/25 12:20:26 by adjoly #+# #+# */
/* Updated: 2024/08/10 17:54:27 by adjoly ### ########.fr */
/* Updated: 2024/08/13 13:45:37 by adjoly ### ########.fr */
/* */
/* ************************************************************************** */
@ -164,7 +164,7 @@ t_list *__split_pipe(char *readline);
t_list *tokenizer(char *readline, t_env *env);
t_redir_sign __to_redir_sign(char *redir_sign);
t_redir *__open_heredoc(char *filename);
t_redir *__open_heredoc(char *filename, t_list *list);
t_redir *__to_redir(char *filename, t_redir_sign sign);
void __get_fd(t_list *list, t_cmd *cmd);
char **__get_argv(char **content);