diff --git a/main.c b/main.c index c4e2e12..ad3d388 100644 --- a/main.c +++ b/main.c @@ -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)