This commit is contained in:
Camille Chauvet 2023-03-22 14:41:17 +01:00
parent 086fd3bcbe
commit 72ff3ba134

5
main.c
View File

@ -12,6 +12,7 @@
#include "data/data.h" #include "data/data.h"
#include "execution/execution.h" #include "execution/execution.h"
#include "libftx/libft/libft.h"
#include "libftx/libft/list.h" #include "libftx/libft/list.h"
#include "libftx/libftx.h" #include "libftx/libftx.h"
#include "minishell.h" #include "minishell.h"
@ -61,7 +62,7 @@ static void ft_cmds_waiter(t_data *data)
{ {
if (WTERMSIG(exit_status) == SIGKILL) if (WTERMSIG(exit_status) == SIGKILL)
data->exit_code = 131; data->exit_code = 131;
else if (WTERMSIG(exit_status) == SIGINT) else //(WTERMSIG(exit_status) == SIGINT)
data->exit_code = 130; data->exit_code = 130;
} }
else else
@ -109,8 +110,8 @@ void ft_ctrlc(int num)
if (data->child_pid > 1) if (data->child_pid > 1)
{ {
kill(data->child_pid, num); kill(data->child_pid, num);
ft_printf("Quit (core dumped)\n");
data->child_pid = 0; data->child_pid = 0;
ft_putchar_fd('\n', 1);
} }
else else
{ {