aboutsummaryrefslogtreecommitdiff
path: root/src/eval/cmd.c
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2020-09-14 15:44:33 +0200
committerCharles Cabergs <me@cacharle.xyz>2020-09-14 15:44:33 +0200
commit7afd22aacdae5d88f560576fd7261801beb60739 (patch)
treef783f22e6866535ec9b09b0f4a65fbe06da7ba4c /src/eval/cmd.c
parent5c5096d5c6d67686c1ad896cbb7a1b5386abf597 (diff)
downloadminishell-7afd22aacdae5d88f560576fd7261801beb60739.tar.gz
minishell-7afd22aacdae5d88f560576fd7261801beb60739.tar.bz2
minishell-7afd22aacdae5d88f560576fd7261801beb60739.zip
Refactoring redir and preprocess_filename to distiguish between command error and fatal error
Diffstat (limited to 'src/eval/cmd.c')
-rw-r--r--src/eval/cmd.c9
1 files changed, 1 insertions, 8 deletions
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 <charles@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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]);