Skip to content

Commit

Permalink
Make the error include exactly which exec function was used
Browse files Browse the repository at this point in the history
  • Loading branch information
josephcsible authored Mar 25, 2024
1 parent 53c6905 commit 701a70c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cbits/posix/fork_exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,17 +282,18 @@ do_spawn_fork (char *const args[],
#if defined(HAVE_EXECVPE)
// XXX Check result
execvpe(args[0], args, environment);
child_failed(forkCommunicationFds[1], "execvpe");
#else
// XXX Check result
execve(exec_path, args, environment);
child_failed(forkCommunicationFds[1], "execve");
#endif
} else {
// XXX Check result
execvp(args[0], args);
child_failed(forkCommunicationFds[1], "execvp");
}

child_failed(forkCommunicationFds[1], "exec");

default:
if ((flags & RUN_PROCESS_IN_NEW_GROUP) != 0) {
setpgid(pid, pid);
Expand Down

0 comments on commit 701a70c

Please sign in to comment.