open_pipes() bugfix

+ write "exit" to STDERR (like bash)
+ set_last_exit_status() on CTRL-C
This commit is contained in:
LuckyLaszlo
2021-12-08 00:22:06 +01:00
parent 200e043a8c
commit caa733e14a
3 changed files with 3 additions and 3 deletions

View File

@@ -53,7 +53,7 @@ static char *read_input(char *prompt, t_all *c)
sigaction(SIGINT, &signal_behaviour, NULL);
if (!line_input)
{
write(1, "exit\n", 5);
write(STDERR_FILENO, "exit\n", 5);
exit_free(c, get_last_exit_status());
}
return (line_input);