maxishell
Implementation of a shell for Linux-like systems
|
#include "shell.h"
#include "libft.h"
#include <stdlib.h>
#include <stdio.h>
#include "env.h"
#include "exit_status.h"
#include "tokens.h"
#include "signals.h"
#include "builtins.h"
Go to the source code of this file.
Functions | |
void | cleanup_exit_resources (t_ms_data *data) |
void | handle_numeric_error (t_ms_data *data, const char *arg) |
void | handle_too_many_args_error (t_ms_data *data) |
void | handle_exit (t_ms_data *data, int status) |
int | builtin_exit (t_ms_data *data) |
int builtin_exit | ( | t_ms_data * | data | ) |
Definition at line 61 of file exit.c.
References s_ms_data::args, EXIT_SUCCESS, ft_atoi(), ft_free_2d_arr(), ft_isnumber(), ft_putendl_fd(), handle_exit(), handle_numeric_error(), and handle_too_many_args_error().
Referenced by execute(), and main_loop().
void cleanup_exit_resources | ( | t_ms_data * | data | ) |
Definition at line 30 of file exit.c.
References clear_history_file(), free_ms_data(), and free_signal_context().
Referenced by handle_exit().
void handle_exit | ( | t_ms_data * | data, |
int | status | ||
) |
Definition at line 53 of file exit.c.
References cleanup_exit_resources(), ft_putendl_fd(), and TOO_MANY_ARGS.
Referenced by builtin_exit(), handle_numeric_error(), and handle_too_many_args_error().
void handle_numeric_error | ( | t_ms_data * | data, |
const char * | arg | ||
) |
Definition at line 37 of file exit.c.
References exit_status_handler(), ft_strjoin(), handle_exit(), and NUMERIC_REQUIRED.
Referenced by builtin_exit().
void handle_too_many_args_error | ( | t_ms_data * | data | ) |
Definition at line 47 of file exit.c.
References exit_status_handler(), handle_exit(), and TOO_MANY_ARGS.
Referenced by builtin_exit().