1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

common: Support new spawn functions for Windows.

--

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka 2022-11-29 19:27:15 +09:00
parent 588f353db1
commit 236a8a3cfb
No known key found for this signature in database
GPG key ID: 640114AF89DE6054
4 changed files with 29 additions and 11 deletions

View file

@ -38,10 +38,14 @@
#include <gpg-error.h>
#include <assuan.h>
#include "i18n.h"
#include "logging.h"
#include "membuf.h"
#include "mischelp.h"
#ifdef HAVE_W32_SYSTEM
#define NEED_STRUCT_SPAWN_CB_ARG 1
#endif
#include "exechelp.h"
#include "sysutils.h"
#include "util.h"
@ -305,8 +309,14 @@ static void
setup_close_all (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
}
/* Run the program PGMNAME with the command line arguments given in