Skip to content

Commit

Permalink
fix(main) execve and error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
neo-jgrec committed Apr 11, 2023
1 parent 73a4fee commit 045d9b4
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/executable/execute.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,11 @@ void execute_command_execve(char **args, char **env, term_t *term)
if (execve(args[0], change_n_value(args,
remove_path(args[0]), 0), env) == -1) {
perror_exit(args[0]);
exit(1);
} else
exit(0);
} else {
if (execve(args[0], args, env) == -1) {
perror_exit(args[0]);
exit(1);
} else
exit(0);
}
Expand Down

0 comments on commit 045d9b4

Please sign in to comment.