-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexec_free_child.c
More file actions
25 lines (22 loc) · 1.17 KB
/
exec_free_child.c
File metadata and controls
25 lines (22 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* exec_child_exit.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: maustel <maustel@student.42heilbronn.de +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/11/15 10:50:42 by maustel #+# #+# */
/* Updated: 2024/11/15 10:50:42 by maustel ### ########.fr */
/* */
/* ************************************************************************** */
#include "../minishell.h"
void free_child_exit(t_shell *shell, int exit_code)
{
int nbr_pipes;
nbr_pipes = ft_lstsize(shell->table) - 1;
free_fd_pid(shell, nbr_pipes);
ft_lstclear(&shell->list, free_token);
free_table(shell->table);
rl_clear_history();
exit (exit_code);
}