[COMMITTED 2.32 5/6] support: Pass environ to child process
Siddhesh Poyarekar
siddhesh@sourceware.org
Wed Apr 14 05:16:26 GMT 2021
Pass environ to posix_spawn so that the child process can inherit
environment of the test.
(cherry picked from commit e958490f8c74e660bd93c128b3bea746e268f3f6)
---
support/support_subprocess.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/support/support_subprocess.c b/support/support_subprocess.c
index 52cea8182a..0d007fbb2d 100644
--- a/support/support_subprocess.c
+++ b/support/support_subprocess.c
@@ -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]);
--
2.29.2
More information about the Libc-stable
mailing list