maxishell
Implementation of a shell for Linux-like systems
Loading...
Searching...
No Matches
signals.h
Go to the documentation of this file.
1/* ************************************************************************** */
2/* */
3/* ::: :::::::: */
4/* signals.h :+: :+: :+: */
5/* +:+ +:+ +:+ */
6/* By: dmdemirk <dmdemirk@student.42london.c +#+ +:+ +#+ */
7/* +#+#+#+#+#+ +#+ */
8/* Created: 2024/07/17 14:07:19 by dmdemirk #+# #+# */
9/* Updated: 2024/09/09 13:20:52 by dmdemirk ### ########.fr */
10/* */
11/* ************************************************************************** */
12
13#ifndef SIGNALS_H
14# define SIGNALS_H
15# define _GNU_SOURCE
16
17# include <termios.h>
18# include <sys/ioctl.h>
19# include <signal.h>
20# include "shell.h"
21
26
27// GLOBAL VAR
28extern volatile sig_atomic_t g_heredoc_interrupted;
29
31
32/* signals */
33void signal_reset_prompt(int signo, siginfo_t *info, \
34 void *ucontext);
36void signal_print_newline(int signal);
37void sigquit_ignore(void);
39void handle_sigint_heredoc(int signo);
40
41int ft_perror(char *str);
43
44#endif
volatile sig_atomic_t g_heredoc_interrupted
void signal_reset_prompt(int signo, siginfo_t *info, void *ucontext)
Definition signals.c:54
void signal_print_newline(int signal)
Definition signals.c:26
void handle_sigint_heredoc(int signo)
struct s_signal_context t_signal_context
void set_signals_interactive(t_ms_data *data)
Definition signals.c:43
int is_external_command_running(void)
int ft_perror(char *str)
t_signal_context * get_context(t_ms_data *data)
void sigquit_ignore(void)
Definition signals.c:33
void set_signals_noninteractive(void)
Definition signals.c:66
t_ms_data * data_cxt
Definition signals.h:24