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 10:37:49 +0530
commitb936cdc7f795e1107b5de13b74bd902f6f748153 (patch)
treed8f857ab904497819d762e76294199c7c18dcbff
parent0e49f103adc199ad6e9664d6d8e99bc5463766f6 (diff)
downloadglibc-b936cdc7f795e1107b5de13b74bd902f6f748153.tar.gz
glibc-b936cdc7f795e1107b5de13b74bd902f6f748153.tar.xz
glibc-b936cdc7f795e1107b5de13b74bd902f6f748153.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 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]);