Compare commits

..

No commits in common. "9ab9c06593f5091a094d3afc02f277aaf86ba2af" and "b502364a670956e95836ead7680024b7ff038eac" have entirely different histories.

3 changed files with 4 additions and 11 deletions

View File

@ -6,14 +6,12 @@
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */ /* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2023/02/15 14:18:21 by cchauvet #+# #+# */ /* Created: 2023/02/15 14:18:21 by cchauvet #+# #+# */
/* Updated: 2023/04/17 10:41:23 by cchauvet ### ########.fr */ /* Updated: 2023/04/07 15:17:21 by alouis-j ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
#include "cmd.h" #include "cmd.h"
#include "cmd_private.h" #include "cmd_private.h"
#include "../signal/signal.h"
#include <signal.h>
void ft_cmddel(void *ptr) void ft_cmddel(void *ptr)
{ {
@ -58,16 +56,13 @@ void ft_cmdwaiter(void *ptr)
{ {
if (exit_status == 131) if (exit_status == 131)
{ {
ft_printf("Quit (core dumped)"); ft_printf("Quit (core dumped)\n");
*ft_get_exit_code() = 131; *ft_get_exit_code() = 131;
} }
else else
*ft_get_exit_code() = 130; *ft_get_exit_code() = 130;
ft_printf("\n");
} }
else else
*ft_get_exit_code() = WEXITSTATUS(exit_status); *ft_get_exit_code() = WEXITSTATUS(exit_status);
} }
signal(SIGINT, ft_ctrlc);
signal(SIGQUIT, ft_quit);
} }

View File

@ -6,7 +6,7 @@
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */ /* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2023/02/21 12:45:16 by cchauvet #+# #+# */ /* Created: 2023/02/21 12:45:16 by cchauvet #+# #+# */
/* Updated: 2023/04/14 17:17:16 by cchauvet ### ########.fr */ /* Updated: 2023/04/14 13:04:01 by cchauvet ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -58,8 +58,6 @@ static bool ft_executor(t_data *data, t_cmd *cmd, char **env)
execve(cmd->executable, cmd->args, env); execve(cmd->executable, cmd->args, env);
return (1); return (1);
} }
signal(SIGQUIT, SIG_IGN);
signal(SIGINT, SIG_IGN);
return (0); return (0);
} }

View File

@ -6,7 +6,7 @@
/* By: cchauvet <cchauvet@student.42angouleme.fr +#+ +:+ +#+ */ /* By: cchauvet <cchauvet@student.42angouleme.fr +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2023/03/28 15:59:01 by cchauvet #+# #+# */ /* Created: 2023/03/28 15:59:01 by cchauvet #+# #+# */
/* Updated: 2023/04/17 10:39:36 by cchauvet ### ########.fr */ /* Updated: 2023/04/11 13:02:34 by cchauvet ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */