maxishell
Implementation of a shell for Linux-like systems
Loading...
Searching...
No Matches
signals_utils.c
Go to the documentation of this file.
1
/* ************************************************************************** */
2
/* */
3
/* ::: :::::::: */
4
/* signals_utils.c :+: :+: :+: */
5
/* +:+ +:+ +:+ */
6
/* By: rocky <marvin@42.fr> +#+ +:+ +#+ */
7
/* +#+#+#+#+#+ +#+ */
8
/* Created: 2024/09/06 13:43:47 by rocky #+# #+# */
9
/* Updated: 2024/09/06 13:43:49 by rocky ### ########.fr */
10
/* */
11
/* ************************************************************************** */
12
13
#include "
signals.h
"
14
#include <readline/readline.h>
15
#include <readline/history.h>
16
#include <unistd.h>
17
#include "
libft.h
"
18
19
void
handle_sigint_heredoc
(
int
signo)
20
{
21
(void)signo;
22
g_heredoc_interrupted
= 1;
23
write(1,
"\n"
, 1);
24
rl_replace_line(
""
, 0);
25
rl_redisplay();
26
}
libft.h
signals.h
g_heredoc_interrupted
volatile sig_atomic_t g_heredoc_interrupted
Definition
redirect_heredoc.c:27
handle_sigint_heredoc
void handle_sigint_heredoc(int signo)
Definition
signals_utils.c:19
src
signals
signals_utils.c
Generated by
1.9.8