Minishell
Loading...
Searching...
No Matches
read_input.c File Reference
#include <signal.h>
#include "../include/utils.h"
#include "../include/main.h"
#include "../include/fill_command.h"
#include "../include/input_processing.h"
#include "../include/run_command.h"
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
Include dependency graph for read_input.c:

Functions

void loop_commands (data_t *data, char *pipe_input)
 
void read_from_terminal (data_t *data)
 
void read_from_pipe (data_t *data)
 

Function Documentation

◆ loop_commands()

void loop_commands ( data_t * data,
char * pipe_input )

This function will create a linked list of commands from the input and loop through it to execute each command

Parameters
dataGlobal data structure
pipe_input
Here is the call graph for this function:

◆ read_from_pipe()

void read_from_pipe ( data_t * data)

Reads the input using getline this function will only run if the input is not directrly written in the terminal and comes from file or pipe

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

◆ read_from_terminal()

void read_from_terminal ( data_t * data)

Reads the input using read with non-cannonical mode only when the input comes from the terminal

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