42_minishell/signal/signal.c

29 lines
1.1 KiB
C
Raw Normal View History

2023-03-29 13:07:57 -04:00
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* signal.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: cchauvet <cchauvet@student.42angouleme.fr +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/03/28 15:59:01 by cchauvet #+# #+# */
2023-04-05 11:32:04 -04:00
/* Updated: 2023/04/05 15:05:11 by alouis-j ### ########.fr */
2023-03-29 13:07:57 -04:00
/* */
/* ************************************************************************** */
#include "signal_private.h"
2023-04-05 11:32:04 -04:00
void ft_ctrlc(int num)
2023-03-29 13:07:57 -04:00
{
2023-04-05 11:32:04 -04:00
(void) num;
2023-03-29 13:07:57 -04:00
rl_replace_line("", 0);
rl_on_new_line();
ft_putchar_fd('\n', 1);
rl_redisplay();
}
void ft_quit(int num)
{
(void) num;
2023-04-05 11:32:04 -04:00
ft_printf("Quit (core dumped)\n");
2023-03-29 13:07:57 -04:00
}