-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsignal.c
26 lines (23 loc) · 1.06 KB
/
signal.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* signal.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: kristori <kristori@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/03/22 10:57:55 by kristori #+# #+# */
/* Updated: 2023/03/28 15:03:03 by kristori ### ########.fr */
/* */
/* ************************************************************************** */
#include "minishell.h"
int g_status;
void ft_sighandle(int sig)
{
if (sig == SIGINT)
{
g_status = 130;
ioctl(STDIN_FILENO, TIOCSTI, "\n");
rl_replace_line("", 0);
rl_on_new_line();
}
}