From 44a32455c8e41400ea96db4507c8a42bdb65b3b6 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Fri, 27 May 2016 22:48:04 +0200 Subject: common: Allow a second input stream for gnupg_exec_tool_stream. * common/exechelp-posix.c (do_exec): Add arg 'except' and pass to close_all_fds. (gnupg_spawn_process): Add arg 'except'. Change callers to pass NULL for it. * common/exechelp-w32.c (gnupg_spawn_process): Add dummy arg 'except'. * common/exechelp-w32ce.c (gnupg_spawn_process): Ditto. * common/exectool.c (copy_buffer_do_copy): Allow NULL for SINK. (gnupg_exec_tool_stream): Add arg 'inextra'. Change callers to pass NULL for it. Allow NULL for OUTPUT. -- This hack is a first step to allow calling gpg for verification of signatures. Signed-off-by: Werner Koch --- common/exectool.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'common/exectool.h') diff --git a/common/exectool.h b/common/exectool.h index d9439aa73..21bc177a1 100644 --- a/common/exectool.h +++ b/common/exectool.h @@ -48,9 +48,9 @@ gpg_error_t gnupg_exec_tool (const char *pgmname, const char *argv[], the NULL terminates array ARGV. If INPUT is not NULL it will be fed to stdin of the process. stderr is logged using log_info and the process' stdout is written to OUTPUT. On error a diagnostic is - printed, and an error code returned. */ + printed, and an error code returned. INEXTRA is reserved. */ gpg_error_t gnupg_exec_tool_stream (const char *pgmname, const char *argv[], - estream_t input, - estream_t output); + estream_t input, estream_t inextra, + estream_t output); #endif /* GNUPG_COMMON_EXECTOOL_H */ -- cgit v1.2.3