#include "minishell.h" #include int ft_heredoc(char *stop) { int fds[2]; char *line; pipe(fds); line = readline("> "); while (line != NULL) { if (ft_strcmp(line, stop) == 0) { free(line); break ; } ft_putstr_fd(line, fds[1]); add_history(line); free(line); line = readline("> "); } close(fds[1]); return (fds[0]); }