Skip to content

Commit

Permalink
Merge pull request #305 from josephcsible/patch-1
Browse files Browse the repository at this point in the history
Make the error include exactly which exec function was used
  • Loading branch information
snoyberg authored Mar 25, 2024
2 parents 53c6905 + 701a70c commit a590acd
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 a590acd

Please sign in to comment.