]> 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>
Tue, 16 Mar 2021 13:36:36 +0000 (19:06 +0530)
Pass environ to posix_spawn so that the child process can inherit
environment of the test.

support/support_subprocess.c

index 838eda96ffd6eb9ab1622f9ab70b5ec655e51350..2acfc57b7e70732d3cf253fa7cf1858b343723d9 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]);