30 if (!redir || !redir->
file)
32 fd = open(redir->
file, flags, mode);
67 if (dup2(fd, STDIN_FILENO) < 0)
68 return (close(fd), 0);
72 if (dup2(fd, STDOUT_FILENO) < 0)
73 return (close(fd), 0);
95 redir = (
t_redir *)current->content;
98 current = current->next;
void shell_error(char *cmd, char *arg, char *msg)
int redir_heredoc(t_shell *shell, t_redir *redir)
Heredoc redirection uygula (fork tabanlı).
static int open_redir_file(t_redir *redir, int flags, int mode)
Redirection dosyasını açar.
int setup_redirs(t_shell *shell, t_cmd *cmd)
Tüm redirectionları uygula.
int apply_redir(t_shell *shell, t_redir *redir)
Tek bir redirection uygula.
Minishell ana header dosyası