summaryrefslogtreecommitdiff
path: root/bootstrap.conf
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2019-09-06 22:24:46 -0400
committerPaul Smith <psmith@gnu.org>2019-09-08 15:12:40 -0400
commit60905a8afb012aa38ac6d56cee24754cc678947c (patch)
tree7ffd8f9802f624bc3ded7e5ab409e8a149de4bd1 /bootstrap.conf
parentebe1d371040d4962c0c4add280f70878b3255118 (diff)
downloadmake-git-60905a8afb012aa38ac6d56cee24754cc678947c.tar.gz
[SV 56834] Support local PATH search with posix_spawnp
When using exec we install the child's environment before invoking execlp(), so commands are found on the child's PATH. posix_spawnp searches on the parent's PATH, which we don't want. Import gnulib's findprog-in module and use it to search the child's PATH, then use posix_spawn() to run it. Also, posix_spawn() does not fall back to trying sh on ENOEXEC, as execlp() does, so implement that as well. * bootstrap.conf: Add the findprog-in gnulib module * src/job.c: Include findprog.h if we're using posix_spawn. (start_job_command): Remove the handling of child->cmd_name, (child_execute_job): and add it here. Look up the command to be run in the child's path and invoke it if found. If it fails with ENOEXEC then retry it as an argument to the default shell. * tests/scripts/misc/general4: Test makefile PATH assignments. * tests/scripts/features/targetvars: Ditto, for target variables.
Diffstat (limited to 'bootstrap.conf')
-rw-r--r--bootstrap.conf1
1 files changed, 1 insertions, 0 deletions
diff --git a/bootstrap.conf b/bootstrap.conf
index 8265660c..5e1d538e 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -46,6 +46,7 @@ gnulib_files=doc/make-stds.texi
gnulib_modules="\
alloca
fdl
+findprog-in
getloadavg
host-cpu-c-abi
strerror