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