still working on memory stuff
This commit is contained in:
parent
8e90a858ad
commit
326c9318e4
18 changed files with 206 additions and 77 deletions
|
|
@ -6,16 +6,16 @@
|
|||
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/05/02 13:22:14 by maiboyer #+# #+# */
|
||||
/* Updated: 2024/05/08 15:33:52 by maiboyer ### ########.fr */
|
||||
/* Updated: 2024/05/08 18:20:46 by maiboyer ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "app/signal_handler.h"
|
||||
#include "me/printf/printf.h"
|
||||
#include "me/types.h"
|
||||
#include "readline/readline.h"
|
||||
#include "me/printf/printf.h"
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
void sigint_handle(int sig, siginfo_t *info, void *ucontext)
|
||||
{
|
||||
|
|
@ -56,7 +56,7 @@ void sigsegv_handle(int sig, siginfo_t *info, void *ucontext)
|
|||
(void)(sig);
|
||||
(void)(info);
|
||||
(void)(ucontext);
|
||||
me_eprintf("SEGFAULT!!!\n");
|
||||
me_eprintf("Abort: SEGFAULT!!!\n");
|
||||
print_trace();
|
||||
exit(139);
|
||||
}
|
||||
|
|
@ -74,9 +74,9 @@ t_error install_signal(void)
|
|||
data.sa_sigaction = sigquit_handle;
|
||||
if (sigaction(SIGQUIT, &data, NULL))
|
||||
return (ERROR);
|
||||
|
||||
data.sa_sigaction = sigsegv_handle;
|
||||
if (sigaction(SIGSEGV, &data, NULL))
|
||||
return (ERROR);
|
||||
|
||||
return (NO_ERROR);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue