Minishell
|
#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>
Functions | |
void | loop_commands (data_t *data, char *pipe_input) |
void | read_from_terminal (data_t *data) |
void | read_from_pipe (data_t *data) |
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
data | Global data structure |
pipe_input |
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
data | Global data structure |
void read_from_terminal | ( | data_t * | data | ) |
Reads the input using read with non-cannonical mode only when the input comes from the terminal
data | Global data structure |