aboutsummaryrefslogtreecommitdiff
path: root/support/capture_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/capture_subprocess.h
parentc8a0e21da63b6e5c7f558cdd31a5d208c1677df3 (diff)
downloadglibc-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/capture_subprocess.h')
-rw-r--r--support/capture_subprocess.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/support/capture_subprocess.h b/support/capture_subprocess.h
index 1ecbdfe4fc..93b7245d2a 100644
--- a/support/capture_subprocess.h
+++ b/support/capture_subprocess.h
@@ -35,11 +35,12 @@ struct support_capture_subprocess
struct support_capture_subprocess support_capture_subprocess
(void (*callback) (void *), void *closure);
-/* Issue FILE with ARGV arguments by using posix_spawn and capture standard
- output, standard error, and the exit status. The out.buffer and err.buffer
- are handle as support_capture_subprocess. */
+/* Issue FILE with ARGV arguments and ENVP environments by using posix_spawn
+ and capture standard output, standard error, and the exit status. If
+ ENVP is NULL the current environment variable is used. The out.buffer and
+ err.buffer are handle by support_capture_subprocess. */
struct support_capture_subprocess support_capture_subprogram
- (const char *file, char *const argv[]);
+ (const char *file, char *const argv[], char *const envp[]);
/* Copy the running program into a setgid binary and run it with CHILD_ID
argument. If execution is successful, return the exit status of the child