Livl Shell  0.1
Livl Shell is an intermediate reimplementation of the bash shell in C language.
Functions
scheduler.h File Reference

File containing the scheduler functions to manage the execution of commands. More...

#include "typedef.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/wait.h>
#include <string.h>
#include "command.h"
#include "console.h"
#include "builtin_commands.h"
#include "redirection.h"
#include "operator.h"
#include "background_manager.h"
#include "constants.h"
Include dependency graph for scheduler.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int execute_external_command (const Command *command, int run_in_background)
 Executes an external command. More...
 
int execute_command (const Command *command, CommandSequence *commandSequence, int run_in_background)
 Executes a command internal to the shell. More...
 
int execute_command_sequence (CommandSequence *sequence)
 Executes a sequence of commands with operators. More...
 

Detailed Description

File containing the scheduler functions to manage the execution of commands.

Author
Julien & Franck
Date
24 Dec 2023

Function Documentation

◆ execute_command()

int execute_command ( const Command command,
CommandSequence commandSequence,
int  run_in_background 
)

Executes a command internal to the shell.

Parameters
commandThe command to execute
commandSequenceThe command sequence to free
run_in_background0 for false, 1 for true
Returns
The status of the execution

◆ execute_command_sequence()

int execute_command_sequence ( CommandSequence sequence)

Executes a sequence of commands with operators.

Parameters
sequenceThe sequence of commands to execute
Returns
The status of the execution

◆ execute_external_command()

int execute_external_command ( const Command command,
int  run_in_background 
)

Executes an external command.

Parameters
commandThe command to execute
run_in_background0 for false, 1 for true
Returns
The status of the execution