9bb5d6
support: Pass environ to child process
9bb5d6
9bb5d6
Pass environ to posix_spawn so that the child process can inherit
9bb5d6
environment of the test.
9bb5d6
9bb5d6
(cherry picked from commit e958490f8c74e660bd93c128b3bea746e268f3f6)
9bb5d6
9bb5d6
diff --git a/support/support_subprocess.c b/support/support_subprocess.c
9bb5d6
index 12c79ff6b0859877..4573350d775ac4c8 100644
9bb5d6
--- a/support/support_subprocess.c
9bb5d6
+++ b/support/support_subprocess.c
9bb5d6
@@ -84,7 +84,7 @@ support_subprogram (const char *file, char *const argv[])
9bb5d6
   xposix_spawn_file_actions_addclose (&fa, result.stdout_pipe[1]);
9bb5d6
   xposix_spawn_file_actions_addclose (&fa, result.stderr_pipe[1]);
9bb5d6
 
9bb5d6
-  result.pid = xposix_spawn (file, &fa, NULL, argv, NULL);
9bb5d6
+  result.pid = xposix_spawn (file, &fa, NULL, argv, environ);
9bb5d6
 
9bb5d6
   xclose (result.stdout_pipe[1]);
9bb5d6
   xclose (result.stderr_pipe[1]);