terminado

This commit is contained in:
marcnava-42cursus
2026-02-14 15:04:25 +01:00
parent c1e622947d
commit 39e5719183
7 changed files with 206 additions and 87 deletions

View File

@@ -53,28 +53,6 @@ int executor_heredoc_open_tmp(char **path_out)
return (-1);
}
char *executor_heredoc_read_line(t_minishell *minishell)
{
char *prompt;
char *line;
size_t len;
if (!isatty(STDIN_FILENO))
{
line = get_next_line(STDIN_FILENO);
if (line == NULL)
return (NULL);
len = ft_strlen(line);
if (len > 0 && line[len - 1] == '\n')
line[len - 1] = '\0';
return (line);
}
prompt = get_var("PS2", minishell);
if (prompt == NULL)
prompt = DEFAULT_PS2;
return (readline(prompt));
}
void executor_heredoc_discard_tmp(int fd, char *path)
{
if (fd >= 0)