-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsignal_handler.c
28 lines (26 loc) · 1.08 KB
/
signal_handler.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* signal_handler.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: emohamed <emohamed@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/09/18 10:55:52 by emohamed #+# #+# */
/* Updated: 2023/09/30 21:37:39 by emohamed ### ########.fr */
/* */
/* ************************************************************************** */
#include "minishell.h"
void siginthandler(int signal)
{
if (signal == SIGINT)
{
printf("\n");
rl_on_new_line();
rl_replace_line("", 0);
rl_redisplay();
}
if (rl_catch_signals == 1)
{
close(0);
}
}