about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@sourceware.org>2021-03-15 17:23:30 +0530
committerSiddhesh Poyarekar <siddhesh@sourceware.org>2021-04-14 11:06:05 +0530
commitad25ea0c470dfbfc937ee6123263703b415a3837 (patch)
treee8b618e78086b276819b14cea411fc77708fee5a
parente9c0d7d7ff4417b9d0bb6b4ac62721de3d6ae683 (diff)
downloadglibc-ad25ea0c470dfbfc937ee6123263703b415a3837.tar.gz
glibc-ad25ea0c470dfbfc937ee6123263703b415a3837.tar.xz
glibc-ad25ea0c470dfbfc937ee6123263703b415a3837.zip
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)
-rw-r--r--support/support_subprocess.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/support/support_subprocess.c b/support/support_subprocess.c
index 0c8cc6af30..9e02ed747a 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]);