maxishell
Implementation of a shell for Linux-like systems
|
#include "shell.h"
#include "tokens.h"
#include "redirection.h"
#include "execute.h"
#include <fcntl.h>
#include <sys/wait.h>
#include "signals.h"
Go to the source code of this file.
Functions | |
static void | setup_sigint_handler (struct sigaction *sa_old) |
static int | handle_heredoc_interruption (char *line, char *eof, int file_fd, struct sigaction *sa_old) |
static void | execute_child (t_ast *node, t_ms_data *data, int *file_fd) |
static void | write_heredoc_lines (char **line, int file_fd, char *eof, t_ms_data *data) |
int | redirect_here_doc (t_ast *node, t_ms_data *data) |
Variables | |
volatile sig_atomic_t | g_heredoc_interrupted = 0 |
Definition at line 59 of file redirect_heredoc.c.
References execute_ast(), s_ms_data::exit_status, ft_perror(), and s_ms_data::std_in.
Referenced by redirect_here_doc().
|
static |
Definition at line 47 of file redirect_heredoc.c.
References EXIT_FAILURE, and g_heredoc_interrupted.
Referenced by redirect_here_doc().
Definition at line 89 of file redirect_heredoc.c.
References s_ast::args, execute_child(), EXIT_SUCCESS, ft_strdup(), g_heredoc_interrupted, handle_heredoc_interruption(), s_ast::left, open_tmp_file(), process_and_reassemble(), s_ast::right, setup_sigint_handler(), and write_heredoc_lines().
Referenced by execute_ast().
|
static |
Definition at line 37 of file redirect_heredoc.c.
References handle_sigint_heredoc().
Referenced by redirect_here_doc().
|
static |
Definition at line 76 of file redirect_heredoc.c.
References ft_strcmp(), ft_strlen(), and g_heredoc_interrupted.
Referenced by redirect_here_doc().
volatile sig_atomic_t g_heredoc_interrupted = 0 |
Definition at line 27 of file redirect_heredoc.c.
Referenced by handle_heredoc_interruption(), handle_sigint_heredoc(), redirect_here_doc(), and write_heredoc_lines().