Compare commits

..

No commits in common. "147af02c6e1cafd396f1498f0f42b04b3b0a73cc" and "96a5856592c9eb3427bdc2a41c139627e2b3718f" have entirely different histories.

11
main.c
View File

@ -6,7 +6,7 @@
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/02/16 15:16:14 by cchauvet #+# #+# */
/* Updated: 2023/03/28 14:35:13 by cchauvet ### ########.fr */
/* Updated: 2023/02/24 11:04:40 by cchauvet ### ########.fr */
/* */
/* ************************************************************************** */
@ -99,10 +99,6 @@ void ft_ctrlc(int num)
{
t_data *data;
if (num == SIGQUIT)
return ;
data = ft_get_data();
data->exit_code = 130;
if (*ft_get_heredoc() != -1)
{
close(*ft_get_heredoc());
@ -110,8 +106,10 @@ 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);
}
@ -129,11 +127,10 @@ 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;
}