fix
This commit is contained in:
@ -51,12 +51,12 @@ static bool ft_executor(t_cmd *cmd, char **env)
|
||||
return (1);
|
||||
if (cmd->pid == 0)
|
||||
{
|
||||
dup2(cmd->fd_in[0], 0);
|
||||
dup2(cmd->fd_out[0], 1);
|
||||
if (cmd->fd_in[1] != -1)
|
||||
dup2(cmd->fd_in[1], 0);
|
||||
if (cmd->fd_out[1] != -1)
|
||||
dup2(cmd->fd_out[1], 1);
|
||||
dup2(cmd->fd_in[0], 0);
|
||||
dup2(cmd->fd_out[0], 1);
|
||||
ft_closer(cmd->fd_in);
|
||||
ft_closer(cmd->fd_out);
|
||||
execve(cmd->executable, cmd->args, env);
|
||||
|
Reference in New Issue
Block a user