From 7afd22aacdae5d88f560576fd7261801beb60739 Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Mon, 14 Sep 2020 15:44:33 +0200 Subject: Refactoring redir and preprocess_filename to distiguish between command error and fatal error --- src/eval/cmd.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'src/eval/cmd.c') diff --git a/src/eval/cmd.c b/src/eval/cmd.c index 223725c..e1d844a 100644 --- a/src/eval/cmd.c +++ b/src/eval/cmd.c @@ -6,7 +6,7 @@ /* By: charles +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/06/14 10:41:31 by charles #+# #+# */ -/* Updated: 2020/09/13 21:00:38 by charles ### ########.fr */ +/* Updated: 2020/09/14 15:42:52 by charles ### ########.fr */ /* */ /* ************************************************************************** */ @@ -15,8 +15,6 @@ pid_t g_child_pid = -1; int g_last_status = 0; -void token_debug(void *v); - int wrapped_cmd(void *void_param) { t_fork_param_cmd *param; @@ -59,13 +57,8 @@ int eval_cmd(int fds[2], t_env env, t_path path, t_ast *ast, pid_t *child_pid) if ((status = redir_extract(&ast->redirs, env, fds)) != 0) return (status); - if ((argv = preprocess(&ast->cmd_argv, env)) == NULL) - { - ast->cmd_argv = NULL; return (EVAL_FATAL); - } - if (argv[0] == NULL) return (0); param.builtin = builtin_search_func(argv[0]); -- cgit