make/tests/scripts
Paul Smith c4e232e44f Always restore global environ if we use vfork
We may change the global environ variable in the child; when using
vfork() this also sets it in the parent.  Preserve the parent's
environ in child_execute_job() so it takes effect for all callers.

Reported by Denis Excoffier <bug-tar@Denis-Excoffier.org>
Root cause found by Martin Dorey <Martin.Dorey@hitachivantara.com>

* src/job.c (start_job_command): Remove save/restore of the parent
environment.
(child_execute_job): Add save/restore of the parent environment,
if we use vfork().
* tests/scripts/functions/shell: Add a test the crashes if we don't
reset environ after we run $(shell ...).
2022-09-25 16:57:31 -04:00
..
features * tests/script/parallelism: Force wait to remove races. 2022-09-20 13:23:44 -04:00
functions Always restore global environ if we use vfork 2022-09-25 16:57:31 -04:00
misc tests: Allow run_make_test() to avoid passing -f 2022-02-27 17:47:42 -05:00
options [SV 56301] Fail if an included makefile can't be built 2022-09-20 03:55:39 -04:00
targets * tests/scripts/targets/WAIT: [SV 63071] Remove possible test races. 2022-09-17 13:22:35 -04:00
variables Fix tests for MacOS and Windows 2022-08-30 21:05:34 -04:00
vms Refresh the test suite framework implementation. 2019-09-16 08:25:33 -04:00
test_template Update the test template. A few fixes in run_make_test(). 2004-09-22 04:36:17 +00:00