/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* heredoc.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: mmoussou "); while (ft_strcmp(line, delimiter)) { status = write(tmp_fd, line, ft_strlen(line)); status = write(tmp_fd, "\n", 1); free(line); line = readline("heredoc> "); } free(line); status = write(tmp_fd, "\0", 1); if (status == -1) { close(tmp_fd); return (-1); } } else waitpid(fork_pid, NULL, 0); return (tmp_fd); }