From 88d955fddce32d9327d65788aabf1738a8c64706 Mon Sep 17 00:00:00 2001 From: Camille Chauvet Date: Fri, 31 Mar 2023 15:29:06 +0200 Subject: [PATCH] fix: heredoc ctrl + d close fd --- redirection/heredoc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/redirection/heredoc.c b/redirection/heredoc.c index 08d9535..c345855 100644 --- a/redirection/heredoc.c +++ b/redirection/heredoc.c @@ -6,7 +6,7 @@ /* By: cchauvet "); line = get_next_line(*ft_get_heredoc()); if (line == NULL) + { + ft_closer(fds); return (1); + } line[ft_strlen(line) - 1] = '\0'; if (ft_strcmp(line, stop) == 0) {