/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* signal.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: cchauvet exit_code = 130; if (*ft_get_heredoc() != -1) { close(*ft_get_heredoc()); *ft_get_heredoc() = -1; } else { if (data->child_pid > 1) { data->child_pid = 0; ft_putchar_fd('\n', 1); } else ft_new_line(); } } void ft_quit(int num) { t_data *data; (void) num; data = ft_get_data(); data->exit_code = 131; if (data->child_pid > 1) { ft_printf("Quit (core dumped)\n"); data->child_pid = 0; } else { rl_replace_line("", 0); rl_redisplay(); } }