changement signaux et reactivation du echoctl quand exit

This commit is contained in:
2024-03-27 14:30:32 +01:00
parent ca90a5f692
commit dad89c923e
9 changed files with 42 additions and 11 deletions

View File

@ -6,7 +6,7 @@
/* By: marde-vr <marde-vr@42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/02/07 14:12:49 by tomoron #+# #+# */
/* Updated: 2024/03/26 09:11:52 by marde-vr ### ########.fr */
/* Updated: 2024/03/26 17:33:20 by tomoron ### ########.fr */
/* */
/* ************************************************************************** */
@ -90,6 +90,8 @@ void exec_commands(t_msh *msh)
}
if (!g_return_code && WIFEXITED(status))
g_return_code = WEXITSTATUS(status);
if(WIFSIGNALED(status) && WTERMSIG(status) == SIGQUIT)
printf("Quit (core dumped)\n");
i = 0;
while (i < cmd_count)
{
@ -103,4 +105,5 @@ void exec_commands(t_msh *msh)
msh->pids = 0;
signal(SIGINT, signal_handler_interactive);
signal(SIGQUIT, signal_handler_interactive);
set_echoctl(0);
}