]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
support: Pass environ to child process
authorSiddhesh Poyarekar <siddhesh@sourceware.org>
Mon, 15 Mar 2021 11:53:30 +0000 (17:23 +0530)
committerSiddhesh Poyarekar <siddhesh@sourceware.org>
Wed, 14 Apr 2021 05:36:05 +0000 (11:06 +0530)
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

index 0c8cc6af30a23c489dc8a793c2515850380de817..9e02ed747abfbd9050c9e05cadd6fc2c0d01cd52 100644 (file)
@@ -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]);