From 701a70cfb39229ba0dfbda6eabc3a4e1390b4bb3 Mon Sep 17 00:00:00 2001 From: "Joseph C. Sible" Date: Mon, 25 Mar 2024 01:41:34 -0400 Subject: [PATCH] Make the error include exactly which exec function was used --- cbits/posix/fork_exec.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cbits/posix/fork_exec.c b/cbits/posix/fork_exec.c index c6242b4d..061904ce 100644 --- a/cbits/posix/fork_exec.c +++ b/cbits/posix/fork_exec.c @@ -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);