From bd49fa19a16c85b2cff6db409fe6f921a31e0d1c Mon Sep 17 00:00:00 2001 From: Adam Joly Date: Mon, 15 Jul 2024 14:43:03 +0200 Subject: [PATCH] =?UTF-8?q?=E3=80=8C=E2=9C=8F=EF=B8=8F=E3=80=8D=20norm:=20?= =?UTF-8?q?normed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/exec/exec_split_cmd.c | 7 ++++--- src/exec/utils_exec_2.c | 8 +++++++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/exec/exec_split_cmd.c b/src/exec/exec_split_cmd.c index ee7739b..f759048 100644 --- a/src/exec/exec_split_cmd.c +++ b/src/exec/exec_split_cmd.c @@ -6,7 +6,7 @@ /* By: mmoussou content, exec.env_array, \ env, exec.pipe_fd); + __sig(); if (((t_cmd *)(list_cmd->content))->outfile != STDOUT_FILENO) close(((t_cmd *)(list_cmd->content))->outfile); if (((t_cmd *)(list_cmd->content))->infile != STDIN_FILENO) diff --git a/src/exec/utils_exec_2.c b/src/exec/utils_exec_2.c index 4cbfb1a..8de03a9 100644 --- a/src/exec/utils_exec_2.c +++ b/src/exec/utils_exec_2.c @@ -6,7 +6,7 @@ /* By: adjoly +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/07/09 22:53:01 by adjoly #+# #+# */ -/* Updated: 2024/07/09 22:57:38 by adjoly ### ########.fr */ +/* Updated: 2024/07/15 14:32:40 by adjoly ### ########.fr */ /* */ /* ************************************************************************** */ @@ -36,3 +36,9 @@ int send_error_exec(char *input) free(input); return (-1); } + +void __sig(void) +{ + signal(SIGQUIT, SIG_IGN); + signal(SIGINT, SIG_IGN); +}