fix: cat work now

This commit is contained in:
Camille Chauvet 2023-03-22 14:35:09 +01:00
parent 0fa822f6db
commit 086fd3bcbe

3
main.c
View File

@ -54,7 +54,7 @@ static void ft_cmds_waiter(t_data *data)
while (current != NULL)
{
content = current->content;
if (content->own_cmd == 1 && content->pid != -1)
if (content->own_cmd == 0 && content->pid != -1)
{
waitpid(content->pid, &exit_status, 0);
if (WIFSIGNALED(exit_status))
@ -69,6 +69,7 @@ static void ft_cmds_waiter(t_data *data)
}
current = current->next;
}
data->child_pid = 0;
}
static int ft_minishell(t_data *data, char *line)