diff options
| author | Christopher Uhlig | 2025-01-25 13:01:10 +0100 |
|---|---|---|
| committer | Christopher Uhlig | 2025-01-25 13:01:10 +0100 |
| commit | 87b90103930d83d74baa998866b0995cb8887d51 (patch) | |
| tree | 0eb876341c2794f2165b83c1d339fb3b38e9f711 /src/execute_cmd.c | |
| parent | 18fb7cb8ae69fc3439266a154aa6b0f947d6805d (diff) | |
| download | minishell-87b90103930d83d74baa998866b0995cb8887d51.tar.gz minishell-87b90103930d83d74baa998866b0995cb8887d51.zip | |
fixed leaks in tokenizer and collectargs also fixed seg for < > and improved value add by $ use
Diffstat (limited to 'src/execute_cmd.c')
| -rw-r--r-- | src/execute_cmd.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/execute_cmd.c b/src/execute_cmd.c index 811c92c..9f00522 100644 --- a/src/execute_cmd.c +++ b/src/execute_cmd.c @@ -6,7 +6,7 @@ /* By: chuhlig <chuhlig@student.42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/12/17 19:21:35 by chuhlig #+# #+# */ -/* Updated: 2025/01/22 16:53:04 by dkaiser ### ########.fr */ +/* Updated: 2025/01/25 11:41:42 by chuhlig ### ########.fr */ /* */ /* ************************************************************************** */ @@ -17,14 +17,6 @@ static void establish_pipeline(int original_stdin, int original_stdout); static int exec_cmd(t_cmd *cmd, t_env **env, int original_std[2], int result); -int invalid_input(char *cmd) -{ - ft_putstr_fd("minishell: ", STDERR_FILENO); - ft_putstr_fd(cmd, STDERR_FILENO); - ft_putstr_fd(": command not found\n", STDERR_FILENO); - return (127); -} - int is_builtin(char *cmd) { return ((ft_strcmp(cmd, "export") == 0) || (ft_strcmp(cmd, "unset") == 0) @@ -104,7 +96,6 @@ static int exec_cmd(t_cmd *cmd, t_env **env, int original_std[2], int result) cmd_path = get_cmd_path(cmd->args[i], *env, &result); if (cmd_path != NULL) execve(cmd_path, &(cmd->args[i]), env_to_strlst(*env)); - // free(cmd_path); exit(result); } waitpid(pid, &status, 0); |
