From 56446bd92394f8c4454a0ed3554aa7f571b5b9de Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Fri, 27 Jan 2023 14:29:57 +0900 Subject: [PATCH] Put gnupg_spawn_helper function to W32, too. -- Signed-off-by: NIIBE Yutaka --- common/exechelp-posix.c | 7 ------- common/exechelp-w32.c | 11 +++++++++++ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/common/exechelp-posix.c b/common/exechelp-posix.c index b29e2f124..af79aab3e 100644 --- a/common/exechelp-posix.c +++ b/common/exechelp-posix.c @@ -1114,14 +1114,7 @@ void gnupg_spawn_helper (struct spawn_cb_arg *sca) { int *user_except = sca->arg; -#ifdef HAVE_W32_SYSTEM - if (user_except[0] == -1) - sca->ask_inherit = 0; - else - sca->ask_inherit = 1; -#else sca->except_fds = user_except; -#endif } gpg_err_code_t diff --git a/common/exechelp-w32.c b/common/exechelp-w32.c index 219b7fe75..adde71862 100644 --- a/common/exechelp-w32.c +++ b/common/exechelp-w32.c @@ -1202,6 +1202,17 @@ spawn_detached (gnupg_process_t process, } +void +gnupg_spawn_helper (struct spawn_cb_arg *sca) +{ + int *user_except = sca->arg; + + if (user_except[0] == -1) + sca->ask_inherit = 0; + else + sca->ask_inherit = 1; +} + gpg_err_code_t gnupg_process_spawn (const char *pgmname, const char *argv[], unsigned int flags,