fix: cat work now
This commit is contained in:
parent
0fa822f6db
commit
086fd3bcbe
3
main.c
3
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)
|
||||
|
Loading…
Reference in New Issue
Block a user