support: Pass environ to child process

Pass environ to posix_spawn so that the child process can inherit
environment of the test.

(cherry picked from commit e958490f8c74e660bd93c128b3bea746e268f3f6)
This commit is contained in:
Siddhesh Poyarekar 2021-03-15 17:23:30 +05:30
parent e9c0d7d7ff
commit ad25ea0c47
1 changed files with 1 additions and 1 deletions

View File

@ -84,7 +84,7 @@ support_subprogram (const char *file, char *const argv[])
xposix_spawn_file_actions_addclose (&fa, result.stdout_pipe[1]);
xposix_spawn_file_actions_addclose (&fa, result.stderr_pipe[1]);
result.pid = xposix_spawn (file, &fa, NULL, argv, NULL);
result.pid = xposix_spawn (file, &fa, NULL, argv, environ);
xclose (result.stdout_pipe[1]);
xclose (result.stderr_pipe[1]);