Minishell
 
Loading...
Searching...
No Matches
exec-utils.c File Reference
#include "garbage.h"
#include "minishell.h"
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
Include dependency graph for exec-utils.c:

Functions

size_t count_commands (t_command *command)
 Cound the number of commands in the command structure.
 
int safe_close (int *fd)
 Safely close fd.
 
void dup_and_close (t_garbage *garbage, int oldfd, int newfd)
 Special dup2 that also closes the old fd.
 
int needs_to_be_forked (t_command *command)
 Check if it needs to be forked.