diff --git a/cmd/cmd.c b/cmd/cmd.c index 982962e..fa4dd8a 100644 --- a/cmd/cmd.c +++ b/cmd/cmd.c @@ -6,12 +6,14 @@ /* By: cchauvet void ft_cmddel(void *ptr) { @@ -56,13 +58,16 @@ void ft_cmdwaiter(void *ptr) { if (exit_status == 131) { - ft_printf("Quit (core dumped)\n"); + ft_printf("Quit (core dumped)"); *ft_get_exit_code() = 131; } else *ft_get_exit_code() = 130; + ft_printf("\n"); } else *ft_get_exit_code() = WEXITSTATUS(exit_status); } + signal(SIGINT, ft_ctrlc); + signal(SIGQUIT, ft_quit); } diff --git a/execution/execution.c b/execution/execution.c index 8c05ba4..35ac93f 100644 --- a/execution/execution.c +++ b/execution/execution.c @@ -6,7 +6,7 @@ /* By: cchauvet executable, cmd->args, env); return (1); } + signal(SIGQUIT, SIG_IGN); + signal(SIGINT, SIG_IGN); return (0); } diff --git a/signal/signal.c b/signal/signal.c index b09acd1..cc108a5 100644 --- a/signal/signal.c +++ b/signal/signal.c @@ -6,7 +6,7 @@ /* By: cchauvet