From 086fd3bcbe7b0142d2528c22a28b1aec420c7f13 Mon Sep 17 00:00:00 2001 From: Camille Chauvet Date: Wed, 22 Mar 2023 14:35:09 +0100 Subject: [PATCH] fix: cat work now --- main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)