about summary refs log tree commit diff
path: root/support/subprocess.h
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2024-05-06 13:18:47 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2024-05-07 12:16:36 -0300
commit1e1ad714ee9a663eda0e2bffad1d9f258b00a4e9 (patch)
tree112d80611fd100e39ef5c19722def14bc5e0c1f7 /support/subprocess.h
parentc8a0e21da63b6e5c7f558cdd31a5d208c1677df3 (diff)
downloadglibc-1e1ad714ee9a663eda0e2bffad1d9f258b00a4e9.tar.gz
glibc-1e1ad714ee9a663eda0e2bffad1d9f258b00a4e9.tar.xz
glibc-1e1ad714ee9a663eda0e2bffad1d9f258b00a4e9.zip
support: Add envp argument to support_capture_subprogram
So tests can specify a list of environment variables.
Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Diffstat (limited to 'support/subprocess.h')
-rw-r--r--support/subprocess.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/support/subprocess.h b/support/subprocess.h
index 8fbb895353..8274a2b22b 100644
--- a/support/subprocess.h
+++ b/support/subprocess.h
@@ -33,10 +33,11 @@ struct support_subprocess
 struct support_subprocess support_subprocess
   (void (*callback) (void *), void *closure);
 
-/* Issue FILE with ARGV arguments by using posix_spawn and return is PID, a
-   pipe redirected to STDOUT, and a pipe redirected to STDERR.  */
+/* Issue FILE with ARGV arguments and ENVP environments by using posix_spawn
+   and return is PID, a pipe redirected to STDOUT, and a pipe redirected to
+   STDERR.  If ENVP is NULL the current environment variable is used.  */
 struct support_subprocess support_subprogram
-  (const char *file, char *const argv[]);
+  (const char *file, char *const argv[], char *const envp[]);
 
 /* Invoke program FILE with ARGV arguments by using posix_spawn and wait for it
    to complete.  Return program exit status.  */