|
minishell
Minishell Project for École 42
|
Subfunctions of process_out_append(), handles output redirections and appends. More...
#include "minishell.h"
Functions | |
| bool | close_outputfile (int fd) |
| Closes and file descriptor. | |
| bool | open_outputfile (t_executor *current, t_lexer_list *lexer) |
| Handles opening an output file. | |
Subfunctions of process_out_append(), handles output redirections and appends.
| bool close_outputfile | ( | int | fd | ) |
Closes and file descriptor.
Closes an output file descriptor, checking for errors.
| fd | The file descriptor to close. |
| bool open_outputfile | ( | t_executor * | current, |
| t_lexer_list * | lexer | ||
| ) |
Handles opening an output file.
Handles opening an output file for the given t_executor node, based on the given lexer list token type. It supports truncating and appending to the file.
| current | A pointer to the current t_executor node. |
| lexer | A pointer to the current t_lexer_list node. |