Minishell
Loading...
Searching...
No Matches
run_command.h File Reference
#include <linux/limits.h>
#include "main.h"
Include dependency graph for run_command.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void handle_signals (int)
 
int run_command (data_t *data, run_command_t *com)
 
void ask_command (data_t *data)
 
int start_program (char **env)
 
int decide_wich_command (data_t *data, char *input, run_command_t *comm)
 

Variables

char command [PATH_MAX]
 

Function Documentation

◆ ask_command()

void ask_command ( data_t * data)

This will read the user input using getline or read with non-cannonical mode depending if the user is using a terminal or not

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

◆ decide_wich_command()

int decide_wich_command ( data_t * data,
char * input,
run_command_t * comm )
Parameters
dataGlobal data structure
inputthe text that the user wrote
commThe current command to execute
Returns
Return 0 if everything is ok, 1 if the command is exite
Here is the call graph for this function:

◆ handle_signals()

void handle_signals ( int )
Here is the call graph for this function:

◆ run_command()

int run_command ( data_t * data,
run_command_t * com )

◆ start_program()

int start_program ( char ** env)
Here is the call graph for this function:

Variable Documentation

◆ command

char command[PATH_MAX]
extern