diff --git a/main.c b/main.c index a272c4f..786ebd7 100644 --- a/main.c +++ b/main.c @@ -6,7 +6,7 @@ /* By: cchauvet exit_code = 130; if (*ft_get_heredoc() != -1) { close(*ft_get_heredoc()); @@ -106,10 +110,8 @@ void ft_ctrlc(int num) } else { - data = ft_get_data(); if (data->child_pid > 1) { - kill(data->child_pid, num); data->child_pid = 0; ft_putchar_fd('\n', 1); } @@ -127,10 +129,11 @@ void ft_quit(int num) { t_data *data; + (void) num; data = ft_get_data(); + data->exit_code = 131; if (data->child_pid > 1) { - kill(data->child_pid, num); ft_printf("Quit (core dumped)\n"); data->child_pid = 0; }