-
Notifications
You must be signed in to change notification settings - Fork 0
/
signal_handlers2.c
38 lines (33 loc) · 1.19 KB
/
signal_handlers2.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* signal_handlers2.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: aoizel <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/01/18 11:24:37 by aoizel #+# #+# */
/* Updated: 2024/01/23 11:42:23 by aoizel ### ########.fr */
/* */
/* ************************************************************************** */
#include "minishell.h"
int void_event(void)
{
return (0);
}
void main_sig_int_handler(int sig)
{
(void)sig;
write(0, "\n", 1);
rl_on_new_line();
rl_replace_line("", 0);
rl_redisplay();
}
void exec_sig_int_handler(int sig)
{
g_last_sig = sig;
}
void heredoc_sig_int_handler(int sig)
{
g_last_sig = sig;
rl_done = 1;
}