open_pipes() bugfix
+ write "exit" to STDERR (like bash) + set_last_exit_status() on CTRL-C
This commit is contained in:
@@ -45,7 +45,7 @@ static int open_pipes(t_cmd *pipeline[])
|
||||
else
|
||||
if (close(pipes[STDOUT_FILENO]) == -1)
|
||||
perror("close()");
|
||||
if (pipeline[i]->fd_in == STDIN_FILENO)
|
||||
if (pipeline[i + 1]->fd_in == STDIN_FILENO)
|
||||
pipeline[i + 1]->fd_in = pipes[STDIN_FILENO];
|
||||
else
|
||||
if (close(pipes[STDIN_FILENO]) == -1)
|
||||
|
||||
Reference in New Issue
Block a user