aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2023-01-27 05:29:57 +0000
committerNIIBE Yutaka <[email protected]>2023-01-27 05:29:57 +0000
commit56446bd92394f8c4454a0ed3554aa7f571b5b9de (patch)
treebebd1b8a009ace97605433762b8753f65e14eb4d
parentMerge branch 'master' into gniibe/t6275 (diff)
downloadgnupg-56446bd92394f8c4454a0ed3554aa7f571b5b9de.tar.gz
gnupg-56446bd92394f8c4454a0ed3554aa7f571b5b9de.zip
Put gnupg_spawn_helper function to W32, too.
-- Signed-off-by: NIIBE Yutaka <[email protected]>
-rw-r--r--common/exechelp-posix.c7
-rw-r--r--common/exechelp-w32.c11
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,