From 1e1ad714ee9a663eda0e2bffad1d9f258b00a4e9 Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Mon, 6 May 2024 13:18:47 -0300 Subject: support: Add envp argument to support_capture_subprogram So tests can specify a list of environment variables. Reviewed-by: Siddhesh Poyarekar --- support/capture_subprocess.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'support/capture_subprocess.h') 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 -- cgit v1.2.3