Closed gysiang closed 4 months ago
Test 40: ❌ cd $PWD hi mini exit code = 0 bash exit code = 1 mini error = () bash error = ( too many arguments) Test 41: ❌ cd 123123 mini exit code = 0 bash exit code = 1 mini error = () bash error = ( No such file or directory)
This was the function that caused it @axellee1994
void execute_builtin_or_exec(t_token *curr, t_shell *minishell) { pid_t pid; if (minishell->prev_fd != 1) close(minishell->prev_fd); if (ft_strncmp(curr->token, "echo", 4) == 0) { pid = fork(); if (pid == 0) { execute_builtin_1(curr, minishell); exit(0); } else minishell->process_ids[minishell->process_count++] = pid; } else { execute_builtin_2(curr, minishell); other_cmds(curr, minishell); } }
@gysiang Resolved in the latest pull request.
Test 40: ❌ cd $PWD hi mini exit code = 0 bash exit code = 1 mini error = () bash error = ( too many arguments) Test 41: ❌ cd 123123 mini exit code = 0 bash exit code = 1 mini error = () bash error = ( No such file or directory)
This was the function that caused it @axellee1994