fix
This commit is contained in:
parent
086fd3bcbe
commit
72ff3ba134
5
main.c
5
main.c
@ -12,6 +12,7 @@
|
||||
|
||||
#include "data/data.h"
|
||||
#include "execution/execution.h"
|
||||
#include "libftx/libft/libft.h"
|
||||
#include "libftx/libft/list.h"
|
||||
#include "libftx/libftx.h"
|
||||
#include "minishell.h"
|
||||
@ -61,7 +62,7 @@ static void ft_cmds_waiter(t_data *data)
|
||||
{
|
||||
if (WTERMSIG(exit_status) == SIGKILL)
|
||||
data->exit_code = 131;
|
||||
else if (WTERMSIG(exit_status) == SIGINT)
|
||||
else //(WTERMSIG(exit_status) == SIGINT)
|
||||
data->exit_code = 130;
|
||||
}
|
||||
else
|
||||
@ -109,8 +110,8 @@ void ft_ctrlc(int num)
|
||||
if (data->child_pid > 1)
|
||||
{
|
||||
kill(data->child_pid, num);
|
||||
ft_printf("Quit (core dumped)\n");
|
||||
data->child_pid = 0;
|
||||
ft_putchar_fd('\n', 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user