summaryrefslogtreecommitdiff
path: root/gl
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 /gl
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 'gl')
0 files changed, 0 insertions, 0 deletions