make/src
Paul Smith 60905a8afb [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.
2019-09-08 15:12:40 -04:00
..
w32 * src/config.h.W32.template [W32]: Add support for dirent.d_type 2019-09-07 20:12:44 -04:00
amiga.c Update copyright statements for 2019 2019-05-19 15:27:26 -04:00
amiga.h Update copyright statements for 2019 2019-05-19 15:27:26 -04:00
ar.c Update copyright statements for 2019 2019-05-19 15:27:26 -04:00
arscan.c Pacify Oracle Studio 12.6 2019-09-02 11:11:26 -04:00
commands.c [SV 28456] Don't override $< when no default rule has been defined 2019-07-13 11:47:26 -04:00
commands.h Update copyright statements for 2019 2019-05-19 15:27:26 -04:00
config.ami.template Switch to the gnulib version of strerror() 2019-07-13 08:47:19 -04:00
config.h-vms.template Switch to the gnulib version of strerror() 2019-07-13 08:47:19 -04:00
config.h.W32.template * src/config.h.W32.template [W32]: Add support for dirent.d_type 2019-09-07 20:12:44 -04:00
configh.dos.template Update copyright statements for 2019 2019-05-19 15:27:26 -04:00
debug.h Update copyright statements for 2019 2019-05-19 15:27:26 -04:00
default.c Update copyright statements for 2019 2019-05-19 15:27:26 -04:00
dep.h Pacify Oracle Studio c99 2019-09-02 11:11:26 -04:00
dir.c * configure.ac: Check whether struct dirent has a d_type field 2019-09-07 20:12:44 -04:00
expand.c Update copyright statements for 2019 2019-05-19 15:27:26 -04:00
file.c [SV 54740] Ensure .SILENT settings do not leak into sub-makes 2019-05-19 15:27:26 -04:00
filedef.h Update copyright statements for 2019 2019-05-19 15:27:26 -04:00
function.c Align child_execute_job among different ports 2019-09-07 18:27:26 -04:00
getopt.c Update copyright statements for 2019 2019-05-19 15:27:26 -04:00
getopt.h Update copyright statements for 2019 2019-05-19 15:27:26 -04:00
getopt1.c Update copyright statements for 2019 2019-05-19 15:27:26 -04:00
gettext.h Update copyright statements for 2019 2019-05-19 15:27:26 -04:00
gmk-default.scm Update copyright statements for 2019 2019-05-19 15:27:26 -04:00
gnumake.h Update copyright statements for 2019 2019-05-19 15:27:26 -04:00
guile.c Update copyright statements for 2019 2019-05-19 15:27:26 -04:00
hash.c * src/hash.c (jash_string): [SV 54980] Avoid ASAN error 2019-05-19 15:27:26 -04:00
hash.h Rework directory structure to use GNU-recommended "src" directory. 2017-11-19 14:07:22 -05:00
implicit.c Update copyright statements for 2019 2019-05-19 15:27:26 -04:00
job.c [SV 56834] Support local PATH search with posix_spawnp 2019-09-08 15:12:40 -04:00
job.h Align child_execute_job among different ports 2019-09-07 18:27:26 -04:00
load.c Update copyright statements for 2019 2019-05-19 15:27:26 -04:00
loadapi.c Update copyright statements for 2019 2019-05-19 15:27:26 -04:00
main.c Align child_execute_job among different ports 2019-09-07 18:27:26 -04:00
makeint.h * src/makeint.h: Add typedef for mode_t if !HAVE_UMASK 2019-09-07 20:12:44 -04:00
misc.c Fix MS-Windows MinGW build 2019-08-28 17:45:49 +03:00
os.h Update copyright statements for 2019 2019-05-19 15:27:26 -04:00
output.c Fix MS-Windows MinGW build 2019-08-28 17:45:49 +03:00
output.h Update copyright statements for 2019 2019-05-19 15:27:26 -04:00
posixos.c Update copyright statements for 2019 2019-05-19 15:27:26 -04:00
read.c Remove useless code in eval 2019-09-02 11:11:26 -04:00
remake.c [SV 54740] Ensure .SILENT settings do not leak into sub-makes 2019-05-19 15:27:26 -04:00
remote-cstms.c Update copyright statements for 2019 2019-05-19 15:27:26 -04:00
remote-stub.c Update copyright statements for 2019 2019-05-19 15:27:26 -04:00
rule.c Update copyright statements for 2019 2019-05-19 15:27:26 -04:00
rule.h Update copyright statements for 2019 2019-05-19 15:27:26 -04:00
signame.c Update copyright statements for 2019 2019-05-19 15:27:26 -04:00
strcache.c Update copyright statements for 2019 2019-05-19 15:27:26 -04:00
variable.c [SV 54549] Don't free used set_lists during merge 2019-05-19 15:27:26 -04:00
variable.h Update copyright statements for 2019 2019-05-19 15:27:26 -04:00
version.c Update copyright statements for 2019 2019-05-19 15:27:26 -04:00
vms_exit.c Update copyright statements for 2019 2019-05-19 15:27:26 -04:00
vms_export_symbol.c Update copyright statements for 2019 2019-05-19 15:27:26 -04:00
vms_progname.c Update copyright statements for 2019 2019-05-19 15:27:26 -04:00
vmsdir.h Update copyright statements for 2019 2019-05-19 15:27:26 -04:00
vmsfunctions.c Update copyright statements for 2019 2019-05-19 15:27:26 -04:00
vmsify.c Update copyright statements for 2019 2019-05-19 15:27:26 -04:00
vmsjobs.c Align child_execute_job among different ports 2019-09-07 18:27:26 -04:00
vpath.c Update copyright statements for 2019 2019-05-19 15:27:26 -04:00