merge conflicts

This commit is contained in:
hugogogo
2021-12-19 12:12:43 +01:00
7 changed files with 126 additions and 66 deletions

View File

@@ -6,7 +6,7 @@
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/10/10 23:53:17 by lperrey #+# #+# */
/* Updated: 2021/12/16 06:35:03 by lperrey ### ########.fr */
/* Updated: 2021/12/18 14:15:13 by lperrey ### ########.fr */
/* */
/* ************************************************************************** */
@@ -20,7 +20,10 @@ int exit_free(t_all *c, int exit_status)
ft_free_2d_arr(environ);
ft_free_2d_arr(c->path);
free_pipeline(&c->pipeline);
rl_clear_history();
if (!isatty(STDIN_FILENO))
gnl(STDIN_FILENO, NULL, 1);
else
rl_clear_history();
close_stdio();
exit(exit_status);
}

View File

@@ -6,7 +6,7 @@
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/10/23 18:56:53 by lperrey #+# #+# */
/* Updated: 2021/12/16 15:06:50 by hulamy ### ########.fr */
/* Updated: 2021/12/19 12:11:14 by hulamy ### ########.fr */
/* */
/* ************************************************************************** */
@@ -35,4 +35,5 @@ void set_signals_behaviour(void)
ft_bzero(&signal_behaviour, sizeof signal_behaviour);
signal_behaviour.sa_handler = SIG_IGN;
sigaction(SIGQUIT, &signal_behaviour, NULL);
sigaction(SIGINT, &signal_behaviour, NULL);
}