42sh 1.0.0
Create a shell in C
Loading...
Searching...
No Matches
source.c File Reference

The file containing the source builtin. More...

Functions

int execute_bash_file (mysh_t *mysh, int file, size_t size)
 Execute a bash file.
 
int exec_source (mysh_t *mysh)
 The source builtin.
 

Detailed Description

The file containing the source builtin.

Function Documentation

◆ exec_source()

int exec_source ( mysh_t * mysh)

The source builtin.

Parameters
myshThe shell structure
Returns
int 0 if the command succeed, 1 otherwise

◆ execute_bash_file()

int execute_bash_file ( mysh_t * mysh,
int file,
size_t size )

Execute a bash file.

Parameters
myshThe shell structure
fileThe file descriptor
sizeThe size of the file
Returns
int The exit status of last command if the command succeed, 1 otherwise