Skip to content

Commit

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

int execute_non_builtin_command(char **args, my_fd_t fd,
Expand Down

0 comments on commit 1898c76

Please sign in to comment.