Minishell
Loading...
Searching...
No Matches
main.h File Reference
#include <stdbool.h>
#include <time.h>
#include <unistd.h>
#include "mini_printf.h"
#include "arguments.h"
#include "epifetch.h"
Include dependency graph for main.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  env_node
 
struct  run_command_s
 
struct  data
 

Typedefs

typedef enum redirection_s redirection_t
 
typedef struct env_node env_node_t
 
typedef struct run_command_s run_command_t
 
typedef struct data data_t
 

Enumerations

enum  redirection_s {
  NONE , PIPE , SEMICOLON , L_REDIRECT_OW ,
  L_REDIRECT_AP , R_REDIRECT_OW , R_REDIRECT_AP
}
 

Functions

void wait_child (int cpid, data_t *data)
 

Typedef Documentation

◆ data_t

typedef struct data data_t

env contains a linked list of the env env_array is the same an env but instead of a linked list is an array home contains the home directory of user status contains the exit code of the last command

◆ env_node_t

typedef struct env_node env_node_t

◆ redirection_t

◆ run_command_t

typedef struct run_command_s run_command_t

Enumeration Type Documentation

◆ redirection_s

Enumerator
NONE 
PIPE 
SEMICOLON 
L_REDIRECT_OW 
L_REDIRECT_AP 
R_REDIRECT_OW 
R_REDIRECT_AP 

Function Documentation

◆ wait_child()

void wait_child ( int cpid,
data_t * data )

This function waits for the executed command to finish and prints any error that could have happened also it will save its exit status code on data->status

Parameters
cpidChild process id
dataGlobal data structure
Here is the call graph for this function: