update: added folding into cmd and changed fold_word name

This commit is contained in:
maix0 2024-10-07 16:49:32 +02:00
parent 7fb16c6a90
commit 5c452993d6
15 changed files with 112 additions and 62 deletions

View file

@ -6,32 +6,19 @@
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/05/02 13:22:14 by maiboyer #+# #+# */
/* Updated: 2024/09/19 23:44:41 by rparodi ### ########.fr */
/* Updated: 2024/10/07 12:14:29 by maiboyer ### ########.fr */
/* */
/* ************************************************************************** */
#include "app/signal_handler.h"
#include "me/types.h"
#include "signal.h"
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
void sig_print_trace(int _idk)
{
(void)(_idk);
print_trace();
}
t_error install_signal(void)
{
struct sigaction data;
data = (struct sigaction){};
data.sa_handler = SIG_IGN;
if (sigaction(SIGINT, &data, NULL))
if (signal(SIGINT, SIG_IGN))
return (ERROR);
if (sigaction(SIGQUIT, &data, NULL))
if (signal(SIGQUIT, SIG_IGN))
return (ERROR);
return (NO_ERROR);
}