From e1831b18fab3e6becfe3db69e08edd6e2b8a0575 Mon Sep 17 00:00:00 2001 From: tomoron Date: Mon, 6 May 2024 16:41:37 +0200 Subject: [PATCH] fix error code --- srcs/exec_bonus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcs/exec_bonus.c b/srcs/exec_bonus.c index 03e4664..5ac1781 100755 --- a/srcs/exec_bonus.c +++ b/srcs/exec_bonus.c @@ -6,7 +6,7 @@ /* By: marde-vr +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/03/28 13:50:14 by tomoron #+# #+# */ -/* Updated: 2024/05/06 16:17:36 by tomoron ### ########.fr */ +/* Updated: 2024/05/06 16:35:37 by tomoron ### ########.fr */ /* */ /* ************************************************************************** */ @@ -135,7 +135,7 @@ void exec_commands(t_msh *msh) if (!msh->tokens && !is_parenthesis(msh->cmds)) { get_redirections(msh, msh->cmds); - g_return_code = (msh->in_fd == -1 || msh->out_fd == -1); + g_return_code = (msh->in_fd < 0 || msh->out_fd < 0); if (msh->in_fd > 2) close(msh->in_fd); if (msh->out_fd > 2)